Sign In/My Account | View Cart  
advertisement

Article:
 Controlling Whitespace, Part 1
Subject: XML formatting
Date: 2005-01-11 08:22:44
From: lucky456

I have an application that writes to an a xml file like this:


<sep__dates><sep_date>thursday</sep_date><sep_dates>


as you can see, everything is on one line,
however when i read it from the xml, i need to parse through it as if it was like this:


<sep_dates>
<sep_date>
thursday
</sep_date>
</sep_dates>


is there some way i can do this?


thanks in advance


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Oldest First
  • XML formatting
    2005-01-11 08:51:22 Bob DuCharme [Reply]

    It sounds like your second application, the one reading the XML, isn't an XML parser, because an XML parser wouldn't care whether that white space is there or not.


    Have your first application (the one writing the xml) insert carriage returns with xsl:text elements that have a single carriage return as their content, like this:


    <xsl:text>
    </xsl:text>


    Bob


Sponsored By: