Re: [xml] Format/indent w/libxml2



If I write a normal XML document via libxml2 it isn't well indented. I
do get output files like the one attached.
PS: It's all about Semerkent (CVS module semerkent): Everytime I create
xml documents with libxml2 I do get such "messed" XML documents..
  It's not messed up. It just didn't 'invented' content which was
not there. Have you read the doc ? 

Shame on me: no.

  Answer: fix your code to insert blanks where needed
  Alternative: use xmlSaveFormatFile ()
          http://xmlsoft.org/html/libxml-tree.html#XMLSAVEFORMATFILE

Ok, I use xmlSaveFormatFile now: hm, the "format" argument has influence
on the indentation as far as I could test (1, 2 do make a difference).

But what do you mean by "insert blanks" -- should I fill up the node
contents with blanks to get a nearwhise better indentation?
--
kabalak / kabalak kabalak net / Fatih Demir
`-GNOME / ICQ:64241161 / GSM: +491749787080
 `-Editor / vim
  `-Filemanager / VFU





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