Re: LibXML2 Indentation



On Tue, Apr 29, 2003 at 01:29:23AM +0200, Ali Akcaagac wrote:
> Hi,
> 
> Short question, is there an environment flag or something that allows
> LibXML2 to indent it's created files instead putting everything into one
> line ? e.g. force every GNOME application to write it's xml based
> configuration in a nicely indented way ?
> 
> In the LibXML2 FAQ I was able to read something about $XMLINT_INDENT
> environment variable but there aren't any further informations about
> this and I'm not sure if this is what I want.

  Have you *really* read the FAQ ?
  http://xmlsoft.org/FAQ.html#Developer
  #1 is the direct  answer to your question.

In a nutshell:
   - white spaces *are significant* in XML content !
   - I you need spaces you should *generate* them
   - libxml2 offers way to indent XML output but will not
     do it by default and will not do it if it detect a possible
     case where changing text nodes may induce a semantic change

Addendum: why post on desktop-devel-list and gnome-devel-list while
          it is clearly a libxml2 only issue ?
	  http://xmlsoft.org/bugs.html
	  There is also a search engine on xmlsoft.org, I hate repeating
	  the same stuff over and over again !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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