How to use variables to populate XML objects

Hello

I'm trying to fill an XML object with information from a loop for. It seems that the info will as long as the string information. Thoughts?

               for(var i:int=0; i<dataSource.length; i++){
                    
                    xmlList += <item></item>;
                    
                    for(var s:String in dataSource[i]){
                         xmlList[i].item +=   <s>test info</s>;
                                             //<hobby>soccer</hobby>;
                                             
                         trace(s);

                    
                    }

This is a generic example of what I think you want to do:

var dataSource:Array =
[
{name: "One", value: 1 "},
{name: "two", value: 2 "},
{name: "three", value: 3 "}
]
var xmlList = new XMLList();
for (var i: int = 0; i
var node: XML = ;
for (var s:String in dataSource [i])
{
var propNode:XML = <{s}> ;
propNode.appendChild (dataSource [i] [s]);
node.appendChild (propNode)
}
xmlList += node;

}
trace (xmlList)

Tags: Adobe Animate

Similar Questions

  • How to use variable Substitution Essbase in ODI

    Hello

    Can someone help me please how to use void var Essbase in ODI?
    I created an interface to load data from text to planning. In the mapping, to the Point of view, I gave the necessary dimensions which is "years". In Essbase, we set a variable called CurrYr which
    We want to use in the view. So, I added a line like this in the map

    'Work', 'Budget', 'CC1', '#sYearValue '. The sYearValue is used to extract the void var Essbase before loading the planning data. I have followed the blog for void var post below (John has been very kind in showing many examples of ODI, link below is one of them).

    [http://john-goodwin.blogspot.com/2009/11/odi-series-planning-11113-enhancements.html]

    Whenever I run the Interface, it fails with the error "ODI-17506: Variable has no value: XXXXX.sYearValue.

    Thanks in advance!

    PM

    This line should print the values in the agent log, see log

    System.out.println ("current year =" + sYearValue + "current period =" + sPerValue);

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to use variable bin in the package without asking a user?

    Hello

    I would write a SQL but I want to use bind variable as static package, without asking the user? As below?

    I would ask you, below it is a variable emp_id? Is this variable BINDING?

    DECLARE
    bonus NUMBER (8.2);
    emp_id NUMBER (6): = 100;
    BEGIN
    SELECT salary * 0.10 IN employees OF bonus
    WHERE employee_id = emp_id;
    END;
    /

    If this isn't the case, as this SQL, how can define a CONNECTION variable as static inside a code? don't ask a user?
    version of DB. 9.2.0.8

    best regards and thank you

    OracleADay wrote:

    I would write a SQL but I want to use bind variable as static package, without asking the user? As below?

    Yes, as you did in this code example.

    All SQL statements must be analyzed as sliders to be filled. PL/SQL source code can contain code PL/SQL (programming language) and the source SQL.

    So, indeed you are coding 2 languages of different source code in the same source program. The PL/SQL compiler is a pretty smart to understand what is PL/SQL code and what is the SQL code. To obtain the SQL source code, he creates transparently calls to the SQL engine - this call to the SQL engine will contain instructions on how to analyze the SQL and bind constants or variables in PL/SQL to SQL.

    The SQL engine saves the sliders in the Shared Pool (the memory of the SGA structure) of Oracle. And you can easily watch the content of the present to see what SQLs cursors here - and what bind variables, if any, they use.

    I posted an example - creating a procedure containing a SQL, execution of the PL/SQL code and then watching the cursor that has been created in the shared Pool. See {message identifier: = 2243507}. And it's a little easier to do that (more detailed) SQL tracing approach Pierre indicated above.

    If this isn't the case, as this SQL, how can define a CONNECTION variable as static inside a code? don't ask a user?

    A PL/SQL variable or a constant that you use in a SQL statement in the PL/SQL code, will be treated as a variable binding when parsing SQL and create the cursor so that it (or re - using an existing cursor).

  • How to use FM OmegaT processed XML files?

    How to convert files in XML (or any other file format that supports the file format that can be used in T Omega) FM so that it can be imported into the translation software open source OmegaT?

    I have a use [Save as] create an XML file, an error message appears when I try to import in Omega T and but I'm unable to translate the file.

    I am trying to use XML files for translation into Omega T, is because in the past, the person who is in charge of editing the file FM would create a text file with sentences to be translated. I would then import the text file in OmegaT to translate and send the text file with the phrases translated to the editor. This could then be edited in a file of FM.

    It would not be a problem if the content to be translated was small. But in some cases there is a large amount of content that must be translated which would take more time to change the FM files.

    What I want to know is if I could use a file format that can be used in Omega T and then be able to convert this file to FM without the Publisher re - edit the file.

    Concerning

    Denjiba-manual

    With regard to the function "Save as XML" in FrameMaker:

    You may know that in FrameMaker, you can work with 'structured' and regular documents.

    When you use "Save as XML" with a document ordinary FM, the resulting XML is simply an output format and are not suitable for reopening in FM. You can translate the XML resulting, but once you return to the FM file, you need to reapply the formatting and the initial numbers back into place. (At least this is what I know of FM8.)

    Otherwise, when you work with an application of structure in FM, you can save documents structured FM in XML format for editing. This means, you can change (translate) the XML document outside FM and open the (translated) XML file published in FM.

    OmegaT regarding:

    I see two ways of translating a document of FM with OmegaT. For both, you will need the Okapi Framework to convert your files into an intermediate format.

    One way requires that your document is a document structured in FM, you can save in XML format for editing. The XML document has probably none of the types of documents that can be translated immediately OmegaT. You can, however, use a utility of the framework of the Okapi to extract translatable text in the XML document in a XLIFF file. Later, you can merge the translated text in the original XML file, which you can bring in FM.

    The other way is similar, but starts with an of FrameMaker MIF file. In this case, regardless of whether or not the document of FM is structured. Of course, there is a MIF Filter for the frame of the Okapi, which allows you to extract the translatable text of MIF in an XLIFF file. Just like above, you can later merge the translated text in the original MIF file. However, the MIF Filter is in beta state, so don't expect it to work perfectly.

    More on the Okapi Framework can be found at http://okapi.opentag.com.

    All that being said, I only played a bit with OmegaT and Okapi. At work, I use an old version of Trados.

    Johannes

  • How to use variables in conjunction with a conditional statement

    v_sql:=  'SELECT  /* * */ trans_id' || 
                'FROM            NDW_trans '||
                'WHERE           cable =TRIM(LEADING 0 FROM ' ||  i_Cab     || ')' || 
                                'AND ' ||  i_Pair  || 'BETWEEN low and highr' ||
                                'AND termsysid =' ||  i_termsysid ||
                                'AND provisionstatus= ' ||  3 /* find what the constant is for inservice*/ ;
                                
         IF     i_Bill IS NOT NULL THEN
                v_sql := v_sql || 'AND CO_Clli = i_Bill';
         END IF;                  
          BEGIN                  
               EXECUTE IMMEDIATE v_sql INTO o_trans_id_list; 
    How can I convert this to binding of variables that I also have a conditional statement which stretches from the place where clause

    Try this

    v_sql:=  'SELECT  /* * */ trans_id
                FROM            NDW_trans
                WHERE           cable =TRIM(LEADING 0 FROM :i_Cab
                                AND  :i_Pair BETWEEN low and highr
                                AND termsysid = :i_termsysid
                                AND provisionstatus=3 '  /* find what the constant is for inservice*/ ;
    
         IF     i_Bill IS NOT NULL THEN
                v_sql := v_sql || 'AND CO_Clli = :i_Bill';
         END IF;
          BEGIN
               EXECUTE IMMEDIATE v_sql INTO o_trans_id_list
               USING i_Cab, i_Pair, i_termsysid, i_Bill ;
    

    HTH
    SS

  • How to use CAlert to print an object.

    I have a block of code as below:

    InterfacePtr<ITextFocus> iSelectionTextFocus(iTextFocus, UseDefaultIID());
      if (iSelectionTextFocus != nil){
      focusStart = iSelectionTextFocus->GetStart(nil);
      }
    
    
    
    
      InterfacePtr<IGTTxtEdtSnapshotInterface> iGTTxtEdtSnapshotInterface(iDocument,UseDefaultIID());
      if (iGTTxtEdtSnapshotInterface == nil || focusStart == kInvalidTextIndex){
      break;
      }
      iGTTxtEdtSnapshotInterface->SetStoryAndIndex(storyUIDRef,focusStart);
      TRACEFLOW(kGTTxtEdtPluginName,"Text story observer range == %d\n", focusStart);
    

    From the code, I want to o print 'focusStart' using CAlert::InformationAlert. But I got error when you try to write a line like this:

    CAlert::InformationAlert(focusStart);
    

    How can I solve this problem?

    Note: The code block is to get the file 'GTTxtEdtStoryObserver.cpp' in InDesgin SDK under the project 'gotolasttextedit '.

    Kind regards

    Tri Dung

    I use these lines of code to make things:

    std::string tempString("Text has changed at index: ");
      std::string index(std::to_string(focusStart));
    
      PMString message(tempString.c_str());
    
      message.Append(index.c_str());
    
      CAlert::InformationAlert(message);
    

    This problem is solved!

    Kind regards

    Tri Dung

  • How to use Javascript to populate a text field based on a selection in a drop-down list?

    Greetings,

    I have virtually no experience with JavaScript and I'm trying to find a way to add some functionality to basic Automation to a form of Adobe.  I have a drop down box called "Hospital_Name" which will contain about 7 possible selections.  When the user makes a selection, I would like to have the field of text (called "Hospital_Address") under the drop-down list fill with the corresponding address to the selection.  I have the "Hospital_Address" text field set up for multiple lines and want the address to have a line break between the address and the city/province/postal code.

    For example, if the user has selected "Hospital 1", the text field would display:

    123 main St

    Anytown, CA 12345

    Help or you can provide examples would be greatly appreciated.

    'Re missing you the document level script that sets the data object and setItems function.

    document level JavaScript; Could be placed in the action open to the page if you cannot access the document JavaScripts level;

    Place all the pre-population data into a single data structure
    var Location = {}
    ' - Hospital - ': {line1: "', line2:" "" "},
    'Bellevue Medical Center': {line1: "2500 BMC Drive", line2: "Bellevue, NOT 68123"},

    "CHI Bergan Mercy": {line1: "7500 mercy Road", line2: "Omaha, NOT 68124"},
    'CHI Emmanuel': {line1: "6901 N 72nd Street", line2: "Omaha, NOT 68122"},
    'CHI Lakeside': {line1: "16901 Lakeside Hills Court", line2: "Omaha, NOT 68130"},

    'CHI Midlands': {line1: "11111 s. 84th Street", line2: "Papillion, DON'T 68046"},
    'Creighton University Medical Center': {line1: ' 601 n. 30th Street ', line2: "Omaha, NO 68131"},
    'Nebraska Medical Center': {line1: "4400 Emile Drive", line2: "Omaha, NOT 68105"}
    };

    function SetFieldValues (Hospital_Name) {}
    location [Hospital_Name] .line1 = this.getField("AddLine1").value;
    this.getField("AddLine2").value = location [Hospital_Name] .line2;
    }

    end document level scripts;

    custom script hits;

    If {(event.willCommit)

    If (event.value == "") this.resetForm (["AddLine1", "AddLine2"]); of other SetFieldValues (event.value);

    }

    end of custom keystroke script;

    Note the formatting of the elements in a column as a line we can help revise the code. Also use a text editor for processing code.

  • How to use variables in the report?

    Hello all,.
    I'm new to PlSql. Please bare with me.

    I have a report that runs on SSRS.
    Here is what I need it to do:

    When the report is run:
    1st of the month: it pulls the data from the previous months.
    16th of the month: from the 1st of the current month to 15.

    I am trying to use a case statement to find the right date and then use this value to ReportDate.
    ReportDate is a column in the database.

    -Find the 1st of the month
    SELECT
    CASE
    WHEN SYSDATE > last_day (add_months (SYSDATE-1))
    AND SYSDATE < last_day (add_months (SYSDATE,-1)) + 2
    THEN
    ReportDate = last_day (add_months (SYSDATE-2))

    ON THE OTHER
    SYSDATE
    END ReportStartDate,

    With the help of 10G.
    Again, I'm pretty new to this, so go easy. Let me know if I can provide any other details.

    Hello

    Welcome to the forum!

    1009545 wrote:
    Hello all,.
    I'm new to PlSql. Please bare with me.

    Certainly not! Isn't this kind of a site!
    Did you mean "Please * bear * with me?"

    I have a report that runs on SSRS.
    Here is what I need it to do:

    When the report is run:
    1st of the month: it pulls the data from the previous months.
    16th of the month: from the 1st of the current month to 15.

    What happens if it is running on another day of the month?
    The query below uses leans on the previous month when it circulates at any time from 1, in the 15th day of the month, inclusively and leans on the 1st to the 15th of the current month when run 16 or later.

    I am trying to use a case statement to find the right date & then use this value to ReportDate.
    ReportDate is a column in the database.

    -Find the 1st of the month
    SELECT
    CASE
    WHEN SYSDATE > last_day (add_months (SYSDATE-1))

    ADD_MONTHS (SYSDATE-1) will always be some time this month, then
    LAST_DAY (ADD_MONTHS (SYSDATE-1) will also be the previous month, but)
    SYSDATE is always in the current month,
    SYSDATE > ADD_MONTHS (SYSDATE-1) will always have the value TRUE.

    AND SYSDATE< last_day(add_months(sysdate,="">
    THEN
    ReportDate = last_day (add_months (SYSDATE-2))

    It's 2 months in the past. Are you ever interested in this old stuff? Areen can't you always interested in 1 months ago, or the current month?

    ON THE OTHER
    SYSDATE
    END ReportStartDate,

    With the help of 10G.
    Again, I'm pretty new to this, so go easy. Let me know if I can provide any other details.

    Whenever you have a problem, post CREATE TABLE and INSERT statements for some examples of data and outcomes from these data.
    See the FAQ forum {message identifier: = 9360002} it only takes a few minutes to read and can really help you get the most out of this forum.

    I think you want something like this:

    WITH     period_of_interest     AS
    (
         SELECT     CASE
                  WHEN  TO_CHAR (SYSDATE, 'DD') < '16'
                                           -- should be '16' above.  See note
                  THEN  TRUNC ( ADD_MONTHS (SYSATE, -1), 'MONTH')
                  ELSE  TRUNC (             SYSDATE    , 'MONTH')
              END     AS period_start
         ,     CASE
                  WHEN  TO_CHAR (SYSDATE, 'DD') < '16'
                  THEN  TRUNC (SYSDATE, 'MONTH')
                  ELSE  TRUNC (SYSDATE, 'MONTH') + 16
              END     AS period_end
         FROM    dual
    )
    SELECT     ...
    FROM     table_x              x
    JOIN     period_of_interest  p  ON  x.transaction_date >= p.period_start
                          AND x.transaction_date <  p.period_end
    ;
    

    Period_end is a somewhat misleading name for the column; It's actually the first DATE after the end of the period; That's why I used < (and not < =) when compared to the x.transaction_date.

    I'm not sure what ReportDate is in your description. This is an example of timid, you must validate CREATE TABLE and INSERT statements for some examples of data. It could be that ReportDate is just what I called transaction_date above.

    Published by: Frank Kulash on June 3, 2013 16:55
    This site is falling out my code. It seens to think the in the first

    WHEN TO_CHAR (SYSDATE, 'DD') < '16'
    

    indicates a kind of markup and will not display the '16', even if I put it on a separate on its own line.

    Published by: Frank Kulash on June 3, 2013 17:09
    Used & lt; to correct the estrangement, after sentries below.

  • OBIEE 11 g: how to call variables in places non-colonne

    Hello world

    I'm used to the table following (http://www.mycabi.net/wp-content/uploads/2010/02/VariablesChart1.jpg) know where and how to use variables in session/repository/presentation of OBIEE 10 g. But I tried to use it in version 11.X.6 of OBIEE and nothing seems to work.

    Specifically, I am using standard variables in the subject text of dashboard, or static text narrative report or report object.

    Can someone point me to a similar document for 11g?

    Thank you!

    -= Joe

    I tried to text object & its syntax is: @{biServer.variables ["VariableName"]}

  • How to use resource element in the xml file in the workflow?

    Good afternoon

    In my workflow, I put a parameter of the attribute with the element of resource type and the value of the attribute is an xml file.

    And I had a problem with xml files in my workflow, I would like to use the information in the xml file to store in the variable...

    Example: in the xml file, I put some information about the number of VLAN ID, and in my script task, I would like to know how is used with myvariable.portgroup [0].spec.vlanId?

    Best regards.

    Like this:

    var myXml = new XML(resource.getContentAsMimeAttachment().content);
    

    You can then access your nodes like this:

    myXml.node.subnode

    Google for e4X to get the syntax complete.

  • How to use AMFPHP objects in Flex

    Hello

    I managed to get amfphp to return PHP objects, the question is now how can I make Flex abreast of objects?

    I invoke a remote object and the objects are returned as a result. Can be used directly or do I have to use XML?

    Hmm, your code seems a bit complicated. Here's what I do:

    The RemoteObject:

    Comments:

    1 yourAMFPHPClassName is the name of the folder in amfphp\services that contains the PHP classes.

    2 ThePHPFile is the class PHP (without the extension) file in the yourAMFPHPClassName folder.

    3. you need the to define the function in the PHP class you want to call. The theFunctionYouWantToCall must be the exact name of the function in the PHP class (case sensitive).

    The part of the ActionScript:

    THE EXAMPLE BELOW will ONLY WORK IF THE PHP FUNCTION RETURNS a UNIQUE VALUE

    This means that the PHP function has a return like this statement: return $value; or return "Test";

    private void myFunctionResultHandler(event:ResultEvent):void

    {

    var PHPResult:String = String (event.result);

    Alert.Show (PHPResult); will indicate that the returned PHP class

    }

    The EXAMPLE below SHOWS HOW to PASS MULTIPLE Flex DATA

    This means that the PHP function has a return like this statement:

    $returnValue = array ();

    $returnValue ['name'] = "George";

    $returnValue ["age"] = $age;

    Return $returnValue;

    private void myFunctionResultHandler(event:ResultEvent):void

    {

    Alert.Show ("Name:" + event.result.name);

    Alert.Show ("Age:" + event.result.age);

    }

    ERROR handler

    private void myFunctionFaultHandler(event:FaultEvent):void

    {

    Alert.Show ("data not can be acquired.");

    }

  • What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?

    Hi all

    I am new to TestStand. Still in the learning process.

    What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?

    Thanks in advance,

    LaVIEWan

    I'm sorry... I discovered that... its not at all possible to pass data to another sequence using variables... it must be through settings... once again I apologize for the display of such a stupid question

  • How can I get the CompactRIO 9074 to communicate with TPC-2206 using variables of network?

    Hello
    I have trouble getting the Rio Compact to connect with my touch screen. The goal is to have the CRIO read in data values, update as network variables and then send them to the touch screen where they are displayed. I used the Distributed System Manager to verify that the CRIO updates the network variables.  I also created alias for the CRIO and PTC files to ensure they have the necessary IP addresses included.  I am able to PING the CRIO of the touch screen, so I don't think it's a problem of network connection. This leads me to believe that the CRIO works properly, hosts the variable library and broadcast on the network, but for some reason the touch panel knows not how to retrieve variables.  I have also noticed that when you change the "Properties" of the executable of touch panel, if the "Shared Variable deployment" section contains a box to checked then result is a mistake trying to "run" the executable file on the touchscreen, however if the box is left then repressed the executable runs without error. He still does not update the values of the CRIO however.
    I don't know what else to try, any help/ideas would be really appreciated!
    Thank you
    -Lindsey

    Equipment I use:
    PTC 2206 touch (Windows XP Embedded)
    CompactRIO 9074
    LabVIEW 2010

    Problem solved, thank you for your help!

    For anyone else having this problem in the future:

    As stated previously, the TPC2206 (touch screen) with Windows XP Embedded does not come with the support of shared variable engine installed.  To resolve this problem, I went to NI.com, typed in "LabVIEW Run-Time Engine 2010" in the search box (if you are using another version of LabVIEW, then find accordingly) and clicked on the second link "LabVIEW Run - Time Engine 2010 - (32-bit Standard RTE) - Windows 7/7 64 bit/Server 2003 R2 (32-bit) / XP/Vista/Vista x 64/Server 2008 R2 (64-bit)" "» downloaded, place the file on a USB key (my touch screen is not connected to the internet), connected to the touchscreen, installed the file and restarted the touch screen.

  • How to use the global variable in the table target?

    Hello

    I am trying to load several files into a single interface. the data is loaded successfully. 92. the files are there. for this I used variables and package.

    My requrement is 92 files of data loaded into the target table. I want to know what data from file.

    to this I added a column (filename) to the existing target table.

    If I used joints (not same condition), its totally wrong. all file names are coming.

    Please see the following screenshots.

    err27.jpg

    exit; target table.

    err26.jpg

    in fact in the target table. first 10 lines are coming from file.i.e first _ACCOUNT_LIMIT_511.TXT. but all the files names are coming.

    I'm confuse. After the first data file inserted then insert second data file. in that all file names are coming. Please help me.

    I thought that the global variable is preferable to identify the data came from which file.

    to do this, the global variable is used in the target table. I don't always have my exit.

    Please help me.

    Thanks in advance.

    err25.jpg

    Hello

    You can use the same way, how you use the project variable, just you have to do a thin is #GLOBAL.variable_name for example: #GLOBAL. SMART_AL_FILE_NAME_S

    Note: Make sure you that while you use one variable overall in interface, indicator should be staged as you chose above the screen

    hope this helps you

    Kind regards

    Phanikanth

  • How can I target a captivate variable go a web object

    How can I target a captivate variable go a web object

    window.parent.window.cpAPIInterface.getVariableValue ("cpQuizInfoStudentID");

    window.parent.window.cpAPIInterface.setVariableValue ("yourVariable", "" value");

    Window.parent.CP.Enable)

    Window.parent.CP.Disable)

    Window.parent.CP.Show)

    Window.parent.CP.Hide)

Maybe you are looking for

  • PC connectivity to the internet takes long

    Then try to access internet in my point of view MY MSN page forever to open.

  • Pavilion 21 keyboard failure

    Several keys on my HP wireless keyboard (model SK-2061), does not work when you press the key crime are a f d and k. After running for about 30 minutes, I can get it to work, but not invariably.  What other wireless keyboard I can use?    The wireles

  • Prevent the user from interacting with the control

    I have a plan I want to "lock".  I don't want the user to be able to zoom or scroll the map at all, I tried touchEvents ignorant, but who has not worked for me. Any thoughts?

  • [HELP] Read the Mobile SIM phone number?

    I already looked through all the API here. https://developer.BlackBerry.com/native/reference/Cascades/device_and_communication_radio_and_sim.ht... And you can't find any API to get the SIM card number. Anyone know please share?

  • Œuvres of VPn on the inside of the interface, but not outside

    I have a PIX-525 with UR license.  I tried to get my VPN to work since my iphone over the weekend, but nothing helped.  Then, I changed the interface inside to see if my iMac could connect and bingo!  It worked.  I then tried to log in via the inside