Getting the parent node only in XML


i have following bit of xml, file called "thexml". want able read first , second children of peice of xml without reading children. i.e. want app1 , app2

<application>
<app1 name="app1">
<module id="1"/>
<module id="2"/>
</app1>
<app2 name="app2">
<module id="3"/>
</app2>
</application>

i have following bit of code, instead of getting 2 nodes want, nodes , children

thexml.child("*")

that gives me

<app1 name="app1">
<module id="1"/>
<module id="2"/>
</app1>
<app2 name="app2">
<module id="3"/>
</app2>

how 2 nodes app1 , app2?


"galwegian" <webforumsuser@macromedia.com> wrote in message
news:gemq1r$t77$1@forums.macromedia.com...
>i have following bit of xml, file called "thexml". want able
>to
> read first , second children of peice of xml without reading
>
> children. i.e. want app1 , app2
>
> <application>
> <app1 name="app1">
> <module id="1"/>
> <module id="2"/>
> </app1>
> <app2 name="app2">
> <module id="3"/>
> </app2>
> </application>
>
> have following bit of code, instead of getting 2
> nodes
> want, nodes , children
>
> thexml.child("*")
>
> gives me
>
> <app1 name="app1">
> <module id="1"/>
> <module id="2"/>
> </app1>
> <app2 name="app2">
> <module id="3"/>
> </app2>
>
> how 2 nodes app1 , app2?

thexml.children().tostring()




More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62