Results 1 to 3 of 3
Jul 25, 2003, 03:01 #1
Formatting text read into flash by XML
I've got a general question about reading in XML. Say i read in a couple of paragraphs of text from XML into flash.... I want to format that text, for example:
create paragraph breaks
change font colour
Now how would I go about doing that? if i start adding tags like <b></b> into my xml file that will cause the xml file to keel over because flash parses the<b></b> tag to be a content tag.....
So how does one format text read into flash via xml?
Any suggestions would be most appreciated
Jul 25, 2003, 10:08 #2
- Join Date
- Aug 2000
- San Diego, CA
- 0 Post(s)
- 0 Thread(s)
A couple of options, one you could format your xml document a little more organized like for instance.
<item> <heading id="heading1"> I am a heading </heading> <para id="para1"> Paragraph 1 text </para> <para id="para2"> Paragraph 2 text </para> </item>
And then you could format each item. Or you can do it this way by using CDATA in your xml document which will allow you to put html tags in your XML nodes. Flash will not choke on this.
<item> <![CDATA[I am some text with <b> html tags </b> in it, by using CDATA <i>the xml parser will ignore me</i>. ]]> </item>Please don't PM me with questions.
Use the forums, that is what they are here for.
Jul 26, 2003, 15:27 #3
Freddy, you da man....
Many thanks for your helpful suggestions.