XML: Apending children

Let's say that the following XML:
< list >
< item > < / item >
< item > < / item >
< / list >

Now in ActionScript, if I have to loop through all the children and you are trying to add text nodes in each node as for

(pseudocode)

children = xml.children ();
for (i = 0; i < children.length (); ++ I)
{
children .appendChild ("test" + i);
}

What is happening here is the two nodes updated twice. It seems that the XML code adds the child to all nodes of the same name. So now my XML looks like this:

< list >
< element > test1 test2 < / item >
< element > test1 test2 < / item >
< / list >

What I want to do is the following:
< list >
Test1 < item > < / item >
Test2 < item > < / item >
< / list >


Is this possible or is the XML in ActionScript borked?

Hmm, I see now that rather than managing multiple xml nodes, flex prefer to group similar nodes in a single table. I'm not particularly fond of that it goes against how to work with XML in other languages and platforms, but I can live with that for now.

As a solution, I'm deleting duplicate nodes and instead adding children to the same kids over and over again. If the result is as follows:



Item1
Item2
Item3
...

In the action script, I have to do the following to access these text nodes:

list.item.getChildren () [index];

I guess that's not bad. He worked my way, the only difference would have been:

List.Item [index]

So, there is a further step involved. Maybe, I'll just write a wrapper which will do that for me.

If anyone wants to share their comments on this, please do. Meanwhile I'll label has responded to this topic.

Tags: Flex

Similar Questions

  • XML has children [whether or not he has]

    Hello guys

     <person name="Roshi">
              <children>
                   <person name="Roomi">
                        <children>
                             <person name="Andy"/>
                             <person name="Johny"/>
                        </children>
                   </person>
                   <person name="Hazy"/>
                   <person name="sunny"/>
              </children>
         </person>;
    

    When I use following code

    {if (XML. Child ("Children"))}

    trace ("he has children");

    } else {}

    trace ("there no");

    }

    But even she print 'there children' for foggy and Sunny who don't have no children

    I really want to make a comparison as

    Roshi has children

    Eric has children

    Andy's not children etc.

    Each loop works well, but I just need to make the comparison

    Please guide

    Thanks in advance

    This should help hopefully:

    //use a wrapper tag to provide access to the top leve person tag
    
    var xml:XML =
              
              
               
                 
                
                
                 
                
                 
                 
              
         
          ;
    
    //try not to use XMLLists as Boolean values, because they are not 'null' and therefore evaluate to true:
    
    if (xml.children.person.(@name=="Roomi")) trace('found Roomi, Great! (or did I?)')
    
    if (xml.children.person.(@name=="Room")) trace('found Room, Great! (or did I?)')
    
    //oh I see, so the XMLList evaluated as a Boolean is wrong...I need to check its length!!!!
    if (xml.children.person.(@name=="Roomi").length()) trace('found Roomi, Great! Now I\'m certain')
    
    if (xml.children.person.(@name=="Room").length()) trace('found Room wasn\'t there because the XMLList length is zero, Great! this is correct!')
    
    //now after I understand that, lets try the looping
    
    //get a person list from anywhere in the xml
    
    var myPeople:XMLList = xml..person;
    
    for each(var individual:XML in myPeople){
         var theseChildren:XMLList=individual.children.person;
         var numChild:uint = theseChildren.length()
         trace(individual.@name+" has children ?:"+Boolean(numChild))
         if (numChild) {
              trace ('the '+((numChild>1)? 'children are ':'child is '));
              for each(var directChild:XML in theseChildren) trace([email protected]())
         }
    }
    
  • (General provisions) Task XML help?

    I have problems to access the items that are empty in XML (without children). Whenever I have imitate the examples of all notifications, the variables I use return null/nothing. Can someone point me in the right direction? I don't know that I do something wrong, I don't know what. I highlighted a part of the example in the following example task where I have problems of data extraction (particularly name field).

    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >

    " < ns6:Task xmlns =" http://www. VMware.com/vCloud/versions "xmlns:ns2 =" http://schemas.dmtf.org/OVF/Envelope/1 "xmlns:ns3 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_VirtualSystemSettingData "xmlns:ns4 =" http://schemas.dmtf.org/wbem/wscim/1/Common "xmlns:ns5 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_ResourceAllocationSettingData "xmlns:ns6 =" http://www. "" "" " VMware.com/vCloud/v1.5 "xmlns:ns7 =" http://www. " VMware.com/Schema/OVF "xmlns:ns8 =" http://schemas.dmtf.org/OVF/Environment/1 "xmlns:ns9 =" http://www. "" ' VMware.com/vCloud/extension/v1.5 'status = startTime 'preRunning' =' 2013-06 - 13 T 19: 00:21.698 - 07:00 "serviceNamespace =" com.vmware.vcloud ' operationName = operation 'vdcRecomposeVapp' = "Virtual Application redial jjhllllllllgvvu (357e4030-0b68-4fdf-bbce-b4ef8995f173)" expiryTime = "2013-09 - 11 T 19: 00:21.698 - 07:00" a cancelRequested = "false" name = 'task' id = "" urn: vcloud:task:77be7776-df5e-4bc0-9314-dc3810573f9e "type="application/vnd.vmware.vcloud.task+xml"href =" https://usyp-VCD.kingstonlab.Corp/API/Task/77be7776-df5e-4BC0-9314-dc3810573f9e ">

    "" < ns6:Link rel = 'down' type="application/vnd.vmware.admin.blockingTask+xml ' href = ' https://usyp-VCD.kingstonlab.Corp/API/admin/extension/blockingTask/847bb7ba-3a8a-4CE0-BAF0-4b039cc895a1 "/>

    "" < ns6:Owner type="application/vnd.vmware.vcloud.vApp+xml" name = "jjhllllllllgvvu" href = " https://usyp-VCD.kingstonlab.Corp/API/vApp/vApp-357e4030-0b68-4fdf-bbCe-b4ef8995f173 "/>

    "" < ns6: User type="application/vnd.vmware.admin.user+xml" name = "eshen_auth" href = " https://usyp-VCD.kingstonlab.Corp/API/Admin/user/538b77ae-0C6C-4ea1-BD95-15e1dcc71814 "/>

    "" < ns6:Organization type="application/vnd.vmware.vcloud.org+xml" name = "lab-AdminOrg" href = " https://usyp-VCD.kingstonlab.Corp/API/org/809f461e-f36b-4b00-b5ab-56e3a8b44fe7 "/>

    < ns6:Progress > 1 < / ns6:Progress >

    " < ns6:Params xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: type ="ns6:RecomposeVAppParamsType"> ".

    " < ns6:DeleteItem type="application/vnd.vmware.vcloud.vm+xml "name ="centos6.2 - 1"href =" https://usyp-VCD.kingstonlab.Corp/API/vApp/VM-82875434-0de1-422c-B57E-f19aac31ea77 « / >

    < / ns6:Params >

    < ns6:Details > blockingTask.pendingStatus < / ns6:Details >

    < / ns6:Task >

    Thank you dirty,

    I have not tested your method, but I managed to solve this problem by using another method.

    I did it by using the following variable assignment:

    (taskDoc is the XML file for the task)

    var items = taskDoc.Params;

    var del = items.*::DeleteItem.@*::name.toString();

    As a side note - it was indeed shown in the package of notifications, contrary to what I said in my question - I just wasn't looking in the right place.

  • How to create and populate dynamic instances of a symbol of a call to xml

    Hello ladies and gentlemen,

    I'm creating an application using flash CS4. I call an asp containing xml with 1 to 30 records. The xml code example below has 3 disks.

    I was hoping that someone would be able to tell me that the code needed for my swf to check how many records there is and which generates a lot of 'pages' of a page template with data dynamically concluded areas of text on each page generated.

    I've included the method that I use to call the xml code.

    Thanks in advance

    Michael

    var xmlData:XML = new XML ();
    var theURL_ur:URLRequest = new URLRequest ("http://mydevsite/myexamplexml.asp");
    var loader_ul:URLLoader = new URLLoader (theURL_ur);
    loader_ul.addEventListener ("complete", fileLoaded);

    function fileLoaded(e:Event):void
    {
    xmlData = XML (loader_ul.data);

    example_txt. Text = xmlData.Example;
    }

    <? XML version = "1.0" encoding = "UTF-8"? >
    < dataroot OD = "" urn: schemas-microsoft-com: officedata "generated =" 2010-06 - 14 T 11: 48:58 ">"
    < Record1 >
    < Course_ID > data < / Course_ID >
    < Title_Course > data < / Title_Course >
    < Description_Course > data < / Description_Course >
    < Time_Course > data < / Time_Course >
    given < Author_Name > < / Author_Name >
    < Author_Email > data < / Author_Email >
    < TP_Number > 1 < / TP_Number >
    < TP_Title > data < / TP_Title >
    < TP_Introduction > data < / TP_Introduction >
    < TP_Slide > data < / TP_Slide >
    < TP_Video > data < / TP_Video >
    < TP_Exercise > data < / TP_Exercise >
    < / Record1 >
    < Record2 >
    < Course_ID > data < / Course_ID >
    < Title_Course > data < / Title_Course >
    < Description_Course > data < / Description_Course >
    < Time_Course > data < / Time_Course >
    given < Author_Name > < / Author_Name >
    < Author_Email > data < / Author_Email >
    < TP_Number > 2 < / TP_Number >
    < TP_Title > data < / TP_Title >
    < TP_Introduction > data < / TP_Introduction >
    < TP_Slide > 0 < / TP_Slide >
    < TP_Video > 0 < / TP_Video >
    < TP_Exercise > 0 < / TP_Exercise >
    < / Record2 >
    < Record3 > registration
    < Course_ID > data < / Course_ID >
    < Title_Course > data < / Title_Course >
    < Description_Course > data < / Description_Course >
    < Time_Course > data < / Time_Course >
    given < Author_Name > < / Author_Name >
    < Author_Email > data < / Author_Email >
    < TP_Number > 3 < / TP_Number >
    < TP_Title > data < / TP_Title >
    < TP_Introduction > data < / TP_Introduction >
    < TP_Slide > 0 < / TP_Slide >
    < TP_Video > 0 < / TP_Video >
    < TP_Exercise > 0 < / TP_Exercise >
    < / record Record3 >
    < / dataroot >

    you use something like:

    var xmlData:XML = new XML ();
    var theURL_ur:URLRequest = new URLRequest ("http://mydevsite/myexamplexml.asp");
    var loader_ul:URLLoader = new URLLoader (theURL_ur);
    loader_ul.addEventListener ("complete", fileLoaded);

    function fileLoaded(e:Event):void
    {
    xmlData = XML (loader_ul.data);

    example_txt. Text = xmlData.Example;

    for (var i: uint = 0; i<>

    create your pages

    XML. Children() [i] will be each record xmllist.  That is to say, Record1, Record2 etc.

    }

    }

  • Embedded font problem.

    I created a separate Flex project to isolate a part of my application I developed using TLF in my main project. In this single project and my main project, I refer to a library of Flex in my work space that behaves like my font library. I am using an external CSS file that is referenced by < fx:Style > in the < s:WindowedApplication > file. When I run this project, it renders styles (color and size) and police incorporated as expected.

    After a week or so to develop this project isolated I the integrated into the main approx. everything worked as it did in the isolated application, even styles (color and size) except the built-in police fails to be made!

    After a repair for a day and a half on this I can't think of any reason why this is. There are components FTE, right next to my TLF component, which use the same embedded fonts that try to use the TLF component!

    Y at - it something I should be looking for it will show th e reason for behavior?

    See picture below on how I instantiated the TextFlow.

    Screen shot 2010-09-09 at 12.06.05 PM.png

    Not sure if this will help, but in order to get my fonts incorporated to make it, I had to do:

    GlobalSettings.resolveFontLookupFunction = null;
    text of installation of an XML element
    var res: XML = XML (xml.htmlText.children () [0]);
    var tf:TextFlow = TextFlowUtil.importFromXML(res,WhiteSpaceCollapse.PRESERVE);
    tf.renderingMode = RenderingMode.CFF;
    tf.fontLookup = FontLookup.EMBEDDED_CFF;
    txt.textFlow = tf;
    txt.textFlow.whiteSpaceCollapse = WhiteSpaceCollapse.PRESERVE;
    txt.textFlow.invalidateAllFormats ();

    The ar to outline the first and the last.

  • How to remove a menuItem in a menuBar component?

    I have a menuBar and need to remove an item, when a user performs an action. Here's my MenuBar struct:
    < node id = "1" >
    < node id = "2" >
    < node id = "3" / >
    < / node >
    < / node >
    I want to remove the node 3... I can get the node but cannot remove it... I used
    var menu: XML = XML (MenuDP.getItemAt (0));
    var menuItem:XML = menu.children () [0];
    var XML = node3:XML (menuItem.children () [0]);

    If I do a trace on node 3, then it is the node to right... So, I think I could do something like that to remove it... But it does not work:
    var menuItemChildren:XMLListCollection = new XMLListCollection (menuItem.children ());
    menuItemChildren.removeItemAt (0);

    but that gives me one... can not delete something null or something like that...

    Any ideas?

    I used the following code and it works.

    var menu: XML = XML (MenuDP.getItemAt (4));
    var menuItem:XML = menu.children () [0];
    var menuItemChildren:XMLList = menuItem.children ();
    If (menuItem.children () .length () > 2) {}
    delete menuItemChildren [2];
    }

  • How to delete children nodes in Xml?

    Hello

    Say there is a set of xml nodes, and each node has a large number of child nodes. How eliminate us all the child nodes of a sudden... Y there, as in any method preset that is defined to do this... As far as I searched there was no method as node.clear () or node.removeall () as in .net!       I have seen node.removechild () but it asks for the name of the node that must be removed...

    Well, I have this requirement where I need to create an xml document. This happens by looping through a set of nodes in the 'for' loops and I needed to clear the children nodes present in each of them after the end of a particular inner loop. in any case I found a solution... I ve changed the way in which the nodes are created. So now I have not wory to this topic... But a clear() method would have been nice. This applies to all objects...

  • Bindable XML children - strange behavior

    Hi people, I met a strange problem and I'm completely stumped on it.

    I hope someone is able to help me with this.

    Here's my situation:

    I have a module mxml, that can be called "Module", which contains a [Bindable] variable protected XML, let's call it "selectedBeer" for reference. It is instantiated with null on the module creation, but full of XML if you click on some specific user interface features. In this XML file, there are two nodes XML children relevant to my problem - let's call them price and AlcoholContent.

    Now I have another module, call it "BeerChoosingModule", which stretches from "Module". He has, among others, two components of the spark NumericStepper. Here is the mxml:

    ...
    <s:HGroup verticalAlign="middle">
              <s:Label text="Selected blah's X:" />
              <s:NumericStepper snapInterval="0.01" stepSize="20" id="desiredPriceEditor" change="changeSelection(event)" minimum="0" maximum="99999" width="120"
                        valueParseFunction="this.PandACFormatter.parseNumber" valueFormatFunction="this.PandACFormatter.format" maxChars="10"
                        value="{this.selectedBeer== null ? 0 : this.PandACFormatter.parseNumber(this.selectedBeer.Price)}"/>
    </s:HGroup>
    <s:HGroup verticalAlign="middle">
              <s:Label text="Selected blah's Y:" />
              <s:NumericStepper snapInterval="0.01" stepSize="20" id="desiredAlcoholContentEditor" change="changeSelection(event)" minimum="0" maximum="99999" width="120"
                        valueParseFunction="this.PandACFormatter.parseNumber" valueFormatFunction="this.PandACFormatter.format" maxChars="10"
                        value="{this.selectedBeer== null ? 0 : this.PandACFormatter.parseNumber(this.selectedBeer.AlcoholContent)}"/>
    </s:HGroup>
    ...
    
    
    

    To the extent of the AlcoholContent and the price get used, they get used together and exactly the same way (i.e. If they are converted to a string for something, they both have, using exactly the same syntax, etc.)

    Now, the inexplicable behavior seems to occur to the link. If I try to change the value of the desiredPriceEditor in the user interface that the application is running, I can't change it's fine, and then the changeSelection (event) function works, assigns a new value to selectedBeer.Price manually and everything is hunkey dory. However, if I try to change the value for the desiredAlcoholContentEditor, as soon as testing of the user interface to make the change, it gets returned back to the original that. PandACFormatter.parseNumber (this.selectedBeer.AlcoholContent).

    Any ideas on what's going wrong here?

    Thanks for the reply.

    Yes, he would. However, in the situation that I have described, if the XML would change, it would change for the price and the AlcoholContent nodes at the same time. Nothing like that happens for the Price node. Now, in the changeSelection(event) function of what I do is something like:

    selectedBeer.Price= desiredPriceEditor . value.toString ()

    selectedBeer.AlcoholContent= desiredAlcoholContentEditor . value.toString ()

    Would it be possible that because I change the first price node, the binding is triggered for the purpose of any selectedBeer, so the desiredAlcoholContentEditor .value property is reset to this.PandACFormatter.parseNumber(this.selectedBeer.AlcoholContent) before the second line of the above code can even run?


  • XML question: How do I search for children without grandchildren

    With an XML document:

    var xml =

    < root >

    < name L1 = "First" >

    < garbage / >

    < / L1 >

    < name L1 = "Second" >

    < garbage / >

    < / L1 >

    < / root >

    I need a XMLList tags < L1 > without their children, then the output should be:

    < name L1 = "First" >

    < name L2 = "Second" >

    Can someone help me with the syntaxt actionscript to accomplish this XML query? I could not find an example that does not return the children of the < L1 > tags as well.

    Thank you

    David

    Well, if you need exact release, you could use this line:

    trace (xml.toXMLString (match) (/<\s*L1.*?>/g) .join ('\n'));

    This approach much faster that doing redundant xmlfiltering + removal of garbage, hope this helps

  • Selection children XML with namespaces

    I'm trying to select children of an XML element nodes that have a different namespace of the parent, but xml.child (name) returns an empty list.

    In the attached code, londonList contains a single XML element and parisList is empty. I can't figure out how to find the child of paris and we tried to add the prefix to findParis (so it's "ff: b") as well as to transform an XML object with the name 'b' findParis to add namespace ff, then passing to the child. None of those who worked.

    Any help is appreciated.

    I found the solution. the child() method uses namespace by default to search for the element name. Because I couldn't understand how to specify a different namespace in the method call, just set default namespace before calling children to the namespace of the element.

  • ORA-19279 with several children in XML

    Hi all

    I get this error:

    ORA-19279: XQuery dynamic type mismatch: expected - singleton sequence got several sequence element

    When you try to select an XML type.

    The XML looks like:
    <users>
      <user>
        <username>123456</username>
        <details>
          <password>password</password>
          <forename>Barry</forename>
          <surname>Donovan</surname>
          <retired>0</retired>
          <email>email.com</email><phone>9999-88880333</phone>
        </details>
        <assignedRoles>
          <EXAM_CODE>9999_4949</EXAM_CODE>
          <EXAM_CODE>8888_3838</EXAM_CODE>
        </assignedRoles>
      </user>
    </users>
    My SQL to query it is:
    SELECT
           h.pin
          ,d.password
          ,d.forename
          ,d.surname
          ,d.email
          ,d.phone
          ,d2.exam_code
          FROM
             robin_temp x,
             xmltable('users/user' passing
                xml COLUMNS
                    pin       varchar2(1000) path 'username'
                  , lineitem  xmltype        path 'details'
                  , lineitem2 xmltype        path 'assignedRoles') h,
             XMLTable('details' PASSING
                h.lineitem COLUMNS
                   password varchar2(1000) path 'password'
                  ,forename varchar2(1000) path 'forename'
                  ,surname  varchar2(1000) path 'surname'
                  ,email    varchar2(1000) path 'email'
                  ,phone    varchar2(1000) path 'phone') d,
             xmltable('assignedRoles' passing
                  h.lineitem2 columns
                  exam_code varchar2(1000) path 'EXAM_CODE' d2                   
    Basically, because there is the child < details > and the < assignedRoles > child, I get this error. But I don't know what we can do about it...

    I'm still trying to sort this issue, but so far no joy at all... I can't imagine that it's a rare thing, then someone can help?

    Thank you so much in advance.

    Robin

    And multiple details, something like that...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2    
      3      123456
      4      
    5 password 6 Barry 7 Donovan 8 0 9 email.com9999-88880333 10
    11 12 9999_4949 13 8888_3838 14 15
    16
    ') as xml from dual) 17 -- 18 -- end of test data 19 -- 20 select x.username 21 ,y.password 22 ,y.forename 23 ,y.surname 24 ,y.retired 25 ,y.email 26 ,z.exam_code 27 from t 28 ,xmltable('/users/user' 29 passing t.xml 30 columns username varchar2(20) path './username' 31 ,details xmltype path './details' 32 ,assignedroles xmltype path './assignedRoles' 33 ) x 34 ,xmltable('/details' 35 passing x.details 36 columns password varchar2(20) path './password' 37 ,forename varchar2(20) path './forename' 38 ,surname varchar2(20) path './surname' 39 ,retired number path './retired' 40 ,email varchar2(50) path './email' 41 ) y 42 ,xmltable('/assignedRoles/EXAM_CODE' 43 passing x.assignedroles 44 columns exam_code varchar2(20) path '.' 45* ) z SQL> / USERNAME PASSWORD FORENAME SURNAME RETIRED EMAIL EXAM_CODE -------------------- -------------------- -------------------- -------------------- ---------- -------------------------------------------------- -------------------- 123456 password Barry Donovan 0 email.com 9999_4949 123456 password Barry Donovan 0 email.com 8888_3838 SQL>
  • How to get specipic children length() in xml


    When Serching for levalid Sting. How can I get this leval page length;

    example 1: search string = "m0_l0_t1" the length of these swift page = 2

    Example 2: search string = "m0_l0" the length of these swift page = 3,

    var myxmlL:XML =

    < root >


    < levalid module = "m0" >

    < levalid lesson = "m0_l0" >
    < levalid topc = "m0_l0_t0" >
    < levalid pages = "m0_l0_t0_p0" >
    < page id = "1" / >


    < / pages >

    < / topc >

    < levalid topc = "m0_l0_t1" >
    < levalid pages = "m0_l0_t1_p0" >

    < page id = "1" / >
    < page id = "2" / >

    < / pages >
    < / topc >
    < / lesson >

    < / module >

    < root >

    Try this:

    myXML.pages. (@levalid.indexOf (stringToSearch) == 0).page.length)

  • Problem with accessing XML children

    Hi all
    I have a huge problem that has been bothering me for the past few hours... it drives me nuts in fact...
    below my code and a screenshot of what I mean exactly... I tried to keep it as short as possible

    Basically when I try to access a subnode (a.project.name in this example) XML, flex does not seem to do anything.
    as you can see b should be "Project1". Instead, it's only a variable initialized XMLList, nothing more...
    normally, everything works without problems... the only difference in my current situation to 'normally' which is the main XML where everything is derived is sitting in an external class.
    However, I can access it when filling a tree control for example so no problem there...
    problems begin when I try to 'dig deeper '...

    I know my way around e4x and may exclude any data type of problems etc...

    http://I32.Tinypic.com/eg8wtw.PNG

    I'm about to pull my hair! Please someone help me ^^ thanks in advance

    'a' is probably already in the 'project '.

    make: trace (a.toXMLString ()); to check

    I suspect you will want to just:
    var b:XMLList = b.SID;

    All the e4x expressions etourner an XMLList, it's just empty the apppropriate isn't fair.

    Tracy

  • Ordering children XML records

    Hello

    I have the following query that retrieves the records in order for a customer.

    SELECT XMLAGG)
    XmlElement ("customer",
    XmlAttributes (id, name)
    (select xmlagg)
    XmlElement ("Order",
    XmlAttributes (o.id AS "O.ID", o.odate as "date")))
    orders o
    where CUSTOMER.ID = O.CUSTID
    ),
    (select xmlagg)
    XmlElement ("Order",
    XmlAttributes (o1.id AS "O1.ID", o1.odate as "O1.date")
    ) )
    of new_orders o1
    where CUSTOMER.ID = O1. CUSTOMERID
    )
    )
    ).extract('/*') xml
    of the customer
    /


    Output
    ---------------------------------------------
    < customer ID = "100" NAME = "ANN" >
    < O.ID = "2000 order" date = "2010-02-10" / > "
    < O.ID = "6000 order" date = "2010-02-10" / > "
    < O.ID = "12000 order" date = "2010-02-10" / > "
    < O1.ID = "2000 to order' O1.date ="2010-02-10"/ >"
    < O1.ID = "6000 to order' O1.date ="2010-02-10"/ >"
    < O1.ID = "12000 to order' O1.date ="2010-02-10"/ >"
    < / customer >
    < customer ID = "300" NAME = 'JACK' >
    < O.ID = "9000 order" date = "2010-02-10" / > "
    < O1.ID = "9000 to order' O1.date ="2010-02-10"/ >"
    < / customer >

    I want to order records to be sorted by o.id and o1.id for an example of customer.for


    < customer ID = "100" NAME = "ANN" >
    < O.ID = "2000 order" date = "2010-02-10" / > "
    < O1.ID = "2000 to order' O1.date ="2010-02-10"/ >"

    < O.ID = "6000 order" date = "2010-02-10" / > "
    < O1.ID = "6000 to order' O1.date ="2010-02-10"/ >"

    < O.ID = "12000 order" date = "2010-02-10" / > "
    < O1.ID = "12000 to order' O1.date ="2010-02-10"/ >"
    < / customer >

    < customer ID = "300" NAME = 'JACK' >
    < O.ID = "9000 order" date = "2010-02-10" / > "
    < O1.ID = "9000 to order' O1.date ="2010-02-10"/ >"
    < / customer >


    The pointers will be appreciated.
    SQL> alter session set nls_date_format='yyyy-mm-dd'
    /
    Session altered.
    
    SQL> with customer as
    (
      select 100 id, 'ANN' name from dual union all
      select 300 id, 'JACK' from dual
    ),
     orders as
    (
      select 2000 id, 100 custid, date '2010-02-10' odate from dual union all
      select 6000 id, 100, date '2010-02-10' odate from dual union all
      select 9000 id, 300, date '2010-02-10' odate from dual union all
      select 12000 id, 100, date '2010-02-10' odate from dual
    ),
    new_orders as
    (
      select 2000 id, 100 custid, date '2010-02-10' odate from dual union all
      select 6000 id, 100, date '2010-02-10' odate from dual union all
      select 9000 id, 300, date '2010-02-10' odate from dual union all
      select 12000 id, 100, date '2010-02-10' odate from dual
    )
    --
    --
    select xmlagg (
              xmlelement ("Customer",
                          xmlattributes (id, name),
                          (select xmlagg (x order by id)
                             from (select custid, id, xmlelement ( "Order", xmlattributes (id "O.ID", o.odate as "date")) x from orders o
                                    union all
                                   select custid, id, xmlelement ("Order", xmlattributes (id "O1.ID", o.odate as "date")) from new_orders o) o
                            where customer.id = o.custid))).extract('/*') xml
      from customer
    /
    XML
    --------------------------------------------------------------------------------
    
      
      
      
      
      
      
    
    
      
      
                                                                         
    
    1 row selected.
    
  • children XML loadClip

    loadClip does not... What is the reason for this:

    trace (nodes Sublst.ChildNodes(1).ChildNodes(0) [1] .firstChild); / / images/IMG_01.jpg

    loadClip (nodes
    Sublst.ChildNodes(1).ChildNodes(0) [1] .firstChild, mc); does not work

    loadClip ("images/IMG_01.jpg", mc); works


    If I had to use loadMovie it would work... but I need to use loadClip because I need listeners.
    In other words, if I used loadMovie, so I could just make a loop and loads all at the same time... but I need to load them one at a time, in order.

    Wow this post was earlier
    Since then, I learned a lot about xml, php, and how to use them with flash.
    I ended up building the .xml differently in php file
    attributes.URL used for the path.
    Its funny watching this code now... I can't believe that it works.
    Anyway, here is the part of the code very sloppy.

Maybe you are looking for

  • Firefox can not search

    following a virus attack, I can't not Firefox to research. This allows me to enter my information search, but when I hit enter nothing happens.

  • UJ - 831S - firmware update problem

    I am with a problem updating firmware V1.02 for ' DVD-RAM MATA * a UJ - 831S ", according to press [OK] appears the message"THE TARGET DISK no IS NOT PRESENT", as to decide?

  • Bulging of the SD card

    I got my RAZR HD since Saturday, and one thing that was kind of annoying is the fact that the SD card is ejected himself. I'm a little surprised motorcycle did not have the sd card to insert identical to the sim card. That being said, it's that somet

  • What is the best Forum on Windows address book

    I'm looking for answers to change the address book windows, the maximum size of the fields and how I might be able to import all or part of my address book Palm OS in the Windows address book. What is my best forum for this information please? Abrada

  • Infinite loop of "Windows Explorer has stopped working" and "Windows Explorer restarts" made my phone useless

    I started to get an infinite loop of these two errors on my laptop, as soon as the desktop and start menu appear, which means that I can't do anything on my laptop. He began to arrive shortly after downloading an update for Adobe AIR (updated automat