RE: [libxml++] keek blancs.
- From: Murray Cumming Comneon com
- To: libxmlplusplus-general lists sourceforge net
- Subject: RE: [libxml++] keek blancs.
- Date: Wed, 28 May 2003 14:46:30 +0200
> From: Christophe de VIENNE [mailto:cdevienne alphacent com]
> Hi,
>
> Not keeping blancs at parsing time or adding some when
> writing to indent is
> breaking the XML specifications.
> However I think it can be usefull to do so. For example in my
> application I do
> have XML files in which I have no content nodes, and that I
> have to edit by
> hand. Having them indented automatically is _very_ much
> easier than to
> include artificial content nodes. I'm sure I'm not alone in this case.
>
> So I propose to modify the API of libxml to give the
> possibility not to keep
> blanks (xmlKeepBlanksDefault option in libxml).
To start with I think the whole keep_blanks name is very confusing. We seem
to be dealing with 2 things here:
1. _Ignoring_ significant white space when parsing the document.
2. _Adding_ indents when writing the document.
Those are easy to understand. If we add the features then I think we should
add them separately and with meaningful names in the API.
I think other parsers add 2. as some kind of pretty-printing method. I don't
know if any other parsers add 1.
1. does seem much more XML-spec-breaking than 2.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]