Hi John, The actual internal structure of the XML comes out as follows:
news +-- newsitem | +-- TEXT NODE (Body of the news article.) | +-- a | | +-- TEXT NODE (Google) | +-- TEXT NODE (More body of the news article.) +-- newsitem etc. (I hope the formatting comes out) As you can see, you have to iterate through all the children of newsitem, rather than just using the firstchild. An alternative strategy would be to surround the body of the news item (including the anchor tags) with a CDATA section (look it up in any decent XML format reference) which would mean that all of the body would be treated as one node - as one string - and your anchor tags would be passed through the parser in the way I think you want. HTH, Ian On 8/8/06, Burns, John D <[EMAIL PROTECTED]> wrote:
I'm having a very weird problem and I'm hoping it's something simple that I'm overlooking. I have an xml document similar to this: <news> <newsitem date="8/5/2006" headline="Some headline">Body of the news article. <a href="http://www.google.com">Google</a> More body of the article</newsitem> <newsitem date="8/1/2006" headline="Another headline">Body of the second article</newsitem> </news> The problem I'm having is that on the first article where the link is, flash is seeing that as the end of the first node and then it skips to the next one. I'm looping over the nodes in news and using this code: trace(newsNode.childNodes[i].firstChild.nodeValue); and all I would see for the first record is "Body of the news article" and then it goes on to the next one. A client is maintaining news through a flat xml file and wants to be able to add links. Am I missing something simple? Is there something else I need to do? Please help. John Burns _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

