RE: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Kessler CTR Mark J
You mean like using dot notation and walking down the nodes or filtering? I use somethings similar with some e4x / xmllistcollections. I just typed this off the top of my head so it might need to be checked. var myXml:XML =

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
No, not exactly. I want to say: for all elements that have a name 'Book' at any level give me its someproperty value. On Mon, Apr 18, 2016 at 11:32 AM Kessler CTR Mark J < mark.kessler@usmc.mil> wrote: > You mean like using dot notation and walking down the nodes or filtering? > I use somethi

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Alex Harui
Show some example XML. It matters if Book is an element or attribute. -Alex On 4/18/16, 9:36 AM, "mark goldin" wrote: >No, not exactly. I want to say: for all elements that have a name 'Book' >at >any level give me its someproperty value. > >On Mon, Apr 18, 2016 at 11:32 AM Kessler CTR Mark J

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
var myXml:XML = ; My point is that element can be at any level and as deep. And it is an el

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Harbs
var myXMLList:XMLList = myXml..Book; On Apr 18, 2016, at 7:50 PM, mark goldin wrote: > var myXml:XML = > > > > > > > > > > >

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
I was thinking about something like this: _myListXML.Books.(attribute('ID') == '298') Which should give me: . That way I can get either all books as you are showing or just a given books id. Is that possible? On Mon, Apr 18, 2016 at 12:50 PM Harbs wrote: > var myXMLList:XMLList =

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
I am trying and it's not returning anything On Mon, Apr 18, 2016 at 1:40 PM mark goldin wrote: > I was thinking about something like this: > _myListXML.Books.(attribute('ID') == '298') > > Which should give me: > > >. > > > That way I can get either all books as you are showing or

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread OmPrakash Muppirala
Try _myListXML.Books.(@ID == '298') On Mon, Apr 18, 2016 at 11:40 AM, mark goldin wrote: > I was thinking about something like this: > _myListXML.Books.(attribute('ID') == '298') > > Which should give me: > > >. > > > That way I can get either all books as you are showing or just a

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
I am also trying this: var elementsList:XML= ; var xl:XMLList=elementsList..*.(@id=="hello"); I am getting an error: No such variable @id On Mon, Apr 18, 2016 at 1:55 PM mark goldin wrote: > I am trying and it's not returning anything > > > On Mon, Apr 18, 2016 at 1:40

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
No such variable: @ID On Mon, Apr 18, 2016 at 2:00 PM mark goldin wrote: > I am also trying this: > > var elementsList:XML= > > > > > > > ; > > var xl:XMLList=elementsList..*.(@id=="hello"); > > I am getting an error: > > No such variable @id > > > On Mon, Apr 18, 2016 at 1

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
Doing it like this: XML.Books.(attribute("ID") == 298), returns no data. On Mon, Apr 18, 2016 at 2:02 PM mark goldin wrote: > No such variable: @ID > > On Mon, Apr 18, 2016 at 2:00 PM mark goldin wrote: > >> I am also trying this: >> >> var elementsList:XML= >> >> >> >> >> >>

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread OmPrakash Muppirala
On Mon, Apr 18, 2016 at 12:02 PM, mark goldin wrote: > No such variable: @ID > That is the notation to reference an attribute. If you have an attribute called ID, you need to use @ID in your search expression. > > On Mon, Apr 18, 2016 at 2:00 PM mark goldin wrote: > > > I am also trying thi

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
Yes, that's what I am trying: XML..Boos.(attribute(@ID == 298) // fails with No such variable: @ID XML..Boos.(attribute("ID") == 298) // doesn't fail, returns empty. On Mon, Apr 18, 2016 at 3:23 PM OmPrakash Muppirala wrote: > On Mon, Apr 18, 2016 at 12:02 PM, mark goldin > wrote: > > > No such

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Harbs
No. XML..Boos.(@ID == 298) On Apr 18, 2016, at 11:25 PM, mark goldin wrote: > Yes, that's what I am trying: > XML..Boos.(attribute(@ID == 298) // fails with No such variable: @ID > XML..Boos.(attribute("ID") == 298) // doesn't fail, returns empty. > > On Mon, Apr 18, 2016 at 3:23 PM OmPrakash M

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Alex Harui
Attributes and element names are case sensitive. Your example XML uses "id" not "ID". var xl:XMLList=elementsList..(@id=="hello"); -Alex On 4/18/16, 1:03 PM, "mark goldin" wrote: >Doing it like this: >XML.Books.(attribute("ID") == 298), returns no data. > >On Mon, Apr 18, 2016 at 2:02 PM mar

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread OmPrakash Muppirala
XML..Boos.(attribute(@ID == 298) should be: XML..Books.(attribute(@ID == '298') If you give a simple example, we can figure this out quickly. This is pretty basic stuff. On Mon, Apr 18, 2016 at 1:25 PM, mark goldin wrote: > Yes, that's what I am trying: > XML..Boos.(attribute(@ID == 298) //

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
This command: elementsList.node.(@id=="hello") fails with the error. On Mon, Apr 18, 2016 at 3:29 PM OmPrakash Muppirala wrote: > XML..Boos.(attribute(@ID == 298) > > should be: > > XML..Books.(attribute(@ID == '298') > > If you give a simple example, we can figure this out quickly. This is > p

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Harbs
Please post some more complete code. On Apr 18, 2016, at 11:33 PM, mark goldin wrote: > This command: > elementsList.node.(@id=="hello") fails with the error. > > On Mon, Apr 18, 2016 at 3:29 PM OmPrakash Muppirala > wrote: > >> XML..Boos.(attribute(@ID == 298) >> >> should be: >> >> XML..B

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
var elementsList:XML= ; elementsList..node.(@id=="hello") // Fails with the error On Mon, Apr 18, 2016 at 3:51 PM Harbs wrote: > Please post some more complete code. > > On Apr 18, 2016, at 11:33 PM, mark goldin wrote: > > > This command: > > elementsList.node.(@id=="hello") fails

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread Harbs
You did not assign it to anything. Try this: var elementsList:XML= ; var newList:XMLList = elementsList..node.(@id=="hello"); trace(newList.toXMLString()); // On Apr 18, 2016, at 11:54 PM, mark goldin wrote: > var elementsList:XML= > > > > > > > ; > > elementsList..node.(@i

Re: [Non-DoD Source] Filtering XML doc

2016-04-18 Thread mark goldin
Yes, needed to assign, I was testing it straight in the Expressions window where it was failing. Thanks !!! On Mon, Apr 18, 2016 at 4:01 PM Harbs wrote: > You did not assign it to anything. > > Try this: > > var elementsList:XML= > > > > > > > ; > > var newList:XMLList = elementsList..n