![]() |
![]() |
||||||
|
|||||||
| Tags: dynamic, node, search, xml |
![]() |
|
|||
|
Hi,
Here is my XML: <Items> <Item> <P1>aaa</P1> <P2>bbb</P2> <P3>ccc</P3> </Item> <Item> <P1>ddd</P1> <P2>bbb</P2> <P3>fff</P3> </Item> <Item> <P1>aaa</P1> <P2>hhh</P2> <P3>iii</P3> </Item> </Items> I would like to wirte a function function searchNode(pName:String, pValue:String):XMLList where I search for "Item"s with a specific value for a specific p node. For example, if I call: searchNode("P2", "bbb") It will return the first and second Item. If I call searchNode("P1", "aaa") It will return the first and third Item. How can I write the "searchNode" function? Thank you very much. ff |
| Sponsored Links |
|
|||
|
I can't believe this is impossible in Actionscript! What a language!
On Apr 7, 4:37 pm, finecur <fine...@yahoo.com> wrote: > Hi, > > Here is my XML: > > <Items> > <Item> > <P1>aaa</P1> > <P2>bbb</P2> > <P3>ccc</P3> > </Item> > > <Item> > <P1>ddd</P1> > <P2>bbb</P2> > <P3>fff</P3> > </Item> > > <Item> > <P1>aaa</P1> > <P2>hhh</P2> > <P3>iii</P3> > </Item> > </Items> > > I would like to wirte a function > > function searchNode(pName:String, pValue:String):XMLList > > where Isearchfor "Item"s with a specific value for a specific p > node. For example, if I call: > searchNode("P2", "bbb") > It will return the first and second Item. If I call > searchNode("P1", "aaa") > It will return the first and third Item. > > How can I write the "searchNode" function? > > Thank you very much. > > ff |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise