Re: [xml] xmlKeepBlanksDefault
- From: Alex Bligh <alex alex org uk>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] xmlKeepBlanksDefault
- Date: Tue, 03 May 2011 07:32:34 +0100
--On 3 May 2011 10:40:52 +0800 Daniel Veillard <veillard redhat com> wrote:
Use xmlReadFile, it's the modern API for parsing
do not use xmlSaveFormatFile, use the modern APIs for saving from xmlsave
http://xmlsoft.org/html/libxml-xmlsave.html
create a saving context, tell it how you want the output.
OK thanks re save. It would be useful if the docs somewhere
said what is deprecated and what isn't.
more than xmlParseFie (currently I'm using ML_PARSE_NONET |
XML_PARSE_NODICT | XML_PARSE_NOXINCNODE | XML_PARSE_NOBLANKS to turn all
that off).
Okay
My concern about using xmlReadFile is that there are options there, and
more options getting added in a newer version of the library may generate
more node types I don't want in the future (the options appear to turn
things off, and not on). xmlParseFile is at least (I think) guaranteed to
not produce more higher level stuff (dictionaries, entities, etc.)
Simpler: "do not use xmlKeepBlanksDefault, it's a global variable"
Well that's admirably concise. I don't mind it being global
per se as I only have one thing reading and writing.
Suggestion for the documentation: That sentence goes in, plus the
statement that default is 1.
(I am happy to send patches for the docs if they are in version
control somewhere rather just whining about them).
--
Alex Bligh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]