Hi,

After you create the DOM writer, set this feature.

if
(theDomWriter->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true))
               
theDomWriter->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true);

You also might wanna look at DOMPrint example. There
is a good implementation of this in there.

Cheers,


Matt.


--- Florent Philippe <[EMAIL PROTECTED]> wrote:

> lol I asked the same a few days ago
> something to do with xmlprettyoutput thing
> google : "xerce-c" xml pretty output
>  
> regs
> phil
> 
> 
> ----- Message d'origine ----
> De : fatboyjim <[EMAIL PROTECTED]>
> À : [email protected]
> Envoyé le : Mercredi, 13 Septembre 2006, 6h50mn 59s
> Objet : Print XML from DOM tree
> 
> 
> Hi all,
> 
> I am able to write XML to a string using a DOMWriter
> and the writeToString()
> method.
> 
> This works fine. I am wondering, is there a way to
> get 'prettier' output?
> ie. a new line after each element, and an extra
> indent between child
> elements, like XML is displayed in Internet Explorer
> etc
> 
> Thanks for your time
> 
> Jim
> -- 
> View this message in context:
>
http://www.nabble.com/Print-XML-from-DOM-tree-tf2266523.html#a6289687
> Sent from the Xerces - C - Users forum at
Nabble.com.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to