Re: [xml] XPath and indentation

Hi Leonardo:

Thank you all. This last advice from Rich is the best solution.
A new question: how do you manage indentation in your XML files?
Do you save them formatted as


or splitted over multiple lines? Indented or not?
Which functions of the libxml do you use?

        As Stefan said, whitespaces matters. So libxml manage
indentation as your example above, because "tag" node has "value" as
a child text node, not "\nvalue\n", or "\tvalue\t" and so on.
        If you are using tree interface for document creation, you can

        xmlSaveFormatFileEnc ("doc.xml", NULL, 1);

        If you are using xmlwriter interface, please wait a little more
'cause I'm working on it's indentation support.



Lucas Brasilino
brasilino recife pe gov br
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078

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