Re: [Flashcoders] retreieving a node that contains a specific attribute from an XML list.
also if you're tracing xml, you could try trace(myXML.toXMLString()); which will make sure that even the root node of the xml is traced a On 13 Sep 2009, at 06:39, Cor wrote: Try this: trace (conteudo.slide[...@id); trace (conteudo.slide[...@id); trace (conteudo.slide[0].tit); -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Isaac Alves Sent: zondag 13 september 2009 2:00 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] retreieving a node that contains a specific attribute from an XML list. I have an XMLList and I would like to retrieve a node in this list that contain a specfic attribute. here is how my XMLlist conteudo is organized. trace (conteudo) throws: slide id=apresentacao titApresentação/tit txt (lots of text...)/txt /slide slide id=sumario titApresentação/tit txt (lots of text...)/txt /slide etc... I've tried the following ways: // gets all nodes that contain the attribue id. that is , the same as trace(conteudo), cause every node contain an // id attribute. i don't need them all to contain the attribute, but i've made so, trying to avoid errors. so there a lot of // nodes in which the id attribute is equal to . // trace (conteudo.(hasOwnProperty(@id)); // this one doesn't throws an error, but doesn't retrieve anything // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // throws the error: ReferenceError: Error #1065: A variável apresentacao não foi definida. (variable not defined) // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // same reference error... // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // why it doesn't work like this? same reference errpr // trace (node i want: + conteudo.(@id == apresentacao)); // this one doesn't throws an error, but doesn't retrieve anything // trace (vamo ve: + conteudo.(@id == apresentacao)); // throws all the attributes @id that exist inside the xmllist, concatenated // trace ( + conteu...@id); // again, here it throws all the attributes @id that exist inside the xmllist , concatenated // if (conteudo.(hasOwnProperty(@id == apresentacao))) // { // trace (tem o id: ); // trace (conteu...@id); // } help please!! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] retreieving a node that contains a specific attribute from an XML list.
I have an XMLList and I would like to retrieve a node in this list that contain a specfic attribute. here is how my XMLlist conteudo is organized. trace (conteudo) throws: slide id=apresentacao titApresentação/tit txt (lots of text...)/txt /slide slide id=sumario titApresentação/tit txt (lots of text...)/txt /slide etc... I've tried the following ways: // gets all nodes that contain the attribue id. that is , the same as trace(conteudo), cause every node contain an // id attribute. i don't need them all to contain the attribute, but i've made so, trying to avoid errors. so there a lot of // nodes in which the id attribute is equal to . // trace (conteudo.(hasOwnProperty(@id)); // this one doesn't throws an error, but doesn't retrieve anything // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // throws the error: ReferenceError: Error #1065: A variável apresentacao não foi definida. (variable not defined) // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // same reference error... // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // why it doesn't work like this? same reference errpr // trace (node i want: + conteudo.(@id == apresentacao)); // this one doesn't throws an error, but doesn't retrieve anything // trace (vamo ve: + conteudo.(@id == apresentacao)); // throws all the attributes @id that exist inside the xmllist, concatenated // trace ( + conteu...@id); // again, here it throws all the attributes @id that exist inside the xmllist , concatenated // if (conteudo.(hasOwnProperty(@id == apresentacao))) // { // trace (tem o id: ); // trace (conteu...@id); // } help please!! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] retreieving a node that contains a specific attribute from an XML list.
Try this: trace (conteudo.slide[...@id); trace (conteudo.slide[...@id); trace (conteudo.slide[0].tit); -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Isaac Alves Sent: zondag 13 september 2009 2:00 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] retreieving a node that contains a specific attribute from an XML list. I have an XMLList and I would like to retrieve a node in this list that contain a specfic attribute. here is how my XMLlist conteudo is organized. trace (conteudo) throws: slide id=apresentacao titApresentação/tit txt (lots of text...)/txt /slide slide id=sumario titApresentação/tit txt (lots of text...)/txt /slide etc... I've tried the following ways: // gets all nodes that contain the attribue id. that is , the same as trace(conteudo), cause every node contain an // id attribute. i don't need them all to contain the attribute, but i've made so, trying to avoid errors. so there a lot of // nodes in which the id attribute is equal to . // trace (conteudo.(hasOwnProperty(@id)); // this one doesn't throws an error, but doesn't retrieve anything // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // throws the error: ReferenceError: Error #1065: A variável apresentacao não foi definida. (variable not defined) // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // same reference error... // trace (conteudo.(hasOwnProperty(@id == apresentacao))); // why it doesn't work like this? same reference errpr // trace (node i want: + conteudo.(@id == apresentacao)); // this one doesn't throws an error, but doesn't retrieve anything // trace (vamo ve: + conteudo.(@id == apresentacao)); // throws all the attributes @id that exist inside the xmllist, concatenated // trace ( + conteu...@id); // again, here it throws all the attributes @id that exist inside the xmllist , concatenated // if (conteudo.(hasOwnProperty(@id == apresentacao))) // { // trace (tem o id: ); // trace (conteu...@id); // } help please!! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders