1 Reply Latest reply on Feb 2, 2008 12:32 AM by Greg Dove

    simple xml ( need help)

      i have spent hours in it but i am not a programmer thats the problem, sometime i can play with attribute kind of xml, i have trying to play with it but didn't get any success

      I have a xml file
      which looks something like this

      [title] your title [/title]
      [content] your content [/content]

      now i want to put another node into so my xml should be something like this

      [title] your title [/title]
      [content] your content [/content]
      [content2] your content [/content2]

      but its not showing up.. i don't know how to access it by flash.
      title and content text are showing up but not my new content2 which i created by myself

      Here is the flash code

      textTitle_txt.text = textData.firstChild.firstChild.firstChild;
      scrollContent.content_txt.autoSize = true;
      scrollContent.content_txt.html = true;
      scrollContent.content_txt.htmlText = textData.firstChild.childNodes[1];

      how can i access to [content2] your content [/content]

      any help would be really appriciated.

        • 1. Re: simple xml ( need help)
          Greg Dove Level 4
          I think you probably have some malformed xml inside your first content tag (perhaps its not like your example and has html tags in it?). In any case a better way to set things up for htmlText inside xml is to use CDATA nodes. Run the code below in flash and see if the output makes sense. Change things a few times and see what happens. Its easier to show CDATA than explain it...(basically its a string of characters that flash does not interpret as xml) but all you need to do is set it up so it looks like this and that you access the CDATA content in the same way.