Adobe Dreamweaver Forums



Last 10 THreads :         template base pages: relative paths don't update (Last Post : Murray *ACE* - Replies : 3 - Views : 4 )           »          PLEASE HELP - submitting a form & retriving the enteredinfo (Last Post : jessica alison roy - Replies : 0 - Views : 1 )           »          Suddenly can't see files on remote server (Last Post : GDrink9085 - Replies : 7 - Views : 8 )           »          remove editable region (Last Post : Murray *ACE* - Replies : 2 - Views : 3 )           »          While executing error (Last Post : Murray *ACE* - Replies : 3 - Views : 4 )           »          Hacked Possible through local machine (Last Post : Murray *ACE* - Replies : 20 - Views : 41 )           »          XPJ file disappeared (Last Post : shelley fletch - Replies : 0 - Views : 1 )           »          Clicking vs. Tab key in training simulations (Last Post : Captiv8r - Replies : 1 - Views : 2 )           »          Can I compile FlexBuilder code with Flex SDK? (Last Post : pxstein - Replies : 0 - Views : 1 )           »          Custom Preloader (Last Post : marcelomdsc - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flash
 
Tags: , , ,



Reply
  #1 (permalink)  
Old 04-13-2008, 03:27 AM
finecur
 
Posts: n/a
Diggs:
Default dynamic XML node search

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


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-13-2008, 03:27 AM
finecur
 
Posts: n/a
Diggs:
Default Re: dynamic XML node search

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


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:02 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk