Well actually this is how I am doing it

 pImplement =
DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("LS"));
Serializer = ((DOMImplementationLS*)pImplement)->createDOMWriter();
XMLFormatTarget *myFormatTarget = new MemBufFormatTarget();
Serializer->writeNode(myFormatTarget, *XDOMDocument);
XMLObject = (char*)((MemBufFormatTarget*)myFormatTarget)->getRawBuffer();

I totally forgot to mention one thing.....I have stored this XML as and
attribute to another XML tag ....will that work?? Is it possible to retrieve
the attribute with the original formatting

Gareth Reakes-6 wrote:
> 
> Hi,
> 
> On 26 Apr 2010, at 18:36, nishank837 wrote:
> 
>> 
>> Hi,
>> I am having problems handling white space etc while parsing XML
>> documents.
>> The data I want to be saved is somethign like this which include line
>> feeds
>> and white spaces
>> <info>
>>       <label>ABB</label>
>>       <description>Please</description>
>> </info>
>> 
>> <question id="TEacher" xsi:type="options">
>> 
>> when I save this xml and parse it and get it i get something like this
>>  <info>        <label>ABB</label>       
>> <description>Please</description></info><question id="TEacher"
>> xsi:type="options">
>> with all the line feeds stripped of.....Can someone let me know how I can
>> retain all these?
> 
> 
> When you say this happens after you parse the document, how do you tell?
> How are you serialising to the second document that does not have the new
> lines in?
> 
> Gareth
> 
> 
> 
> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/Problems-with-White-Space-and-Line-Feed-Handling-tp28367855p28367855.html
>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
> 
> -- 
> Gareth Reakes, CTO         WE7 - Great Music, Free
> +44-20-7117-0809                    http://www.we7.com
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problems-with-White-Space-and-Line-Feed-Handling-tp28367855p28373515.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to