hi folks

i'm writing some xml for my site to load in content and, because i want to use html, i'm using cdata in my description nodes.

The problem is that if i do the following:

[xml]
<?xml version="1.0" encoding="UTF-8"?>
<site>
        <blog>
        </blog>
        <portfolio>
                <carousel>
                        <carouselItem name="Test" imgUrl="icon_logo.png" 
linkUrl="">
                                <description>
                                        <![CDATA[<p class="heading">Heading</p>
                                        <p>Description from xml.</p>]]>
                                </description>
                        </carouselItem>
                        <carouselItem name="Test" imgUrl="icon_logo.png" 
linkUrl="">
                                <description>
                                        <![CDATA[<p class="heading">Heading</p>
                                        <p>Description from xml.</p>]]>
                                </description>
                        </carouselItem>
                </carousel>
        </portfolio>
        <contact>
        </contact>
</site>
[/xml]

which is the best structural way of creating it (in my opinion), the CDATA keeps the whitespace between the 2 lines which means that the best way (in as3's eyes) for me to do this is:

[xml]
<?xml version="1.0" encoding="UTF-8"?>
<site>
        <blog>
        </blog>
        <portfolio>
                <carousel>
                        <carouselItem name="Test" imgUrl="icon_logo.png" 
linkUrl="">
                                <description>
<![CDATA[<p class="heading">Heading</p>
<p>Description from xml.</p>]]>
                                </description>
                        </carouselItem>
                        <carouselItem name="Test" imgUrl="icon_logo.png" 
linkUrl="">
                                <description>
<![CDATA[<p class="heading">Heading</p>
<p>Description from xml.</p>]]>
                                </description>
                        </carouselItem>
                </carousel>
        </portfolio>
        <contact>
        </contact>
</site>
[/xml]

which is jarring to write (again, my opinion). Is there any way (like the old ignoreWhite param), that i can get as3 to strip the extra tabs and linebreaks (even within CDATA)?

thanks
a



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to