Re: [xml] Question about xmlDumpDoc()



On 28 Aug 2007, Callum Gibson said:

On 28 Aug 08:49, Daniel Corbe wrote:
}Is there a mode of operation or an equivalent function which causes the XML
}file to be written with proper indentation?

Use the *Format* variation of the dump/save functions. eg.

xmlDocFormatDump vs xmlDocDump
xmlDocDumpFormatMemory vs xmlDocDumpMemory
xmlSaveFormatFile vs xmlFormatFile

Ooo thank you, I've been needing something that produces indented XML
but had no idea libxml could do it. That got me looking until I found
the XML_SAVE_FORMAT option, which does the same job. I have some happy
customers now :)

(hm, the manual's description isn't very useful. `Formatted output' could
mean virtually anything... at lead mentioning the word `indented' might
be wise...)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]