RE: [libxml++] writing formatted (indented) files
- From: Murray Cumming Comneon com
- To: libxmlplusplus-general lists sourceforge net
- Subject: RE: [libxml++] writing formatted (indented) files
- Date: Fri, 9 May 2003 09:20:47 +0200
> From: Eric Bourque [mailto:ericb computer org]
> On Thu, 2003-05-08 at 11:26, Christophe de Vienne wrote:
> > > Daniel would probably tell you in strong terms that formatting is
> > > significant therefore libxml shouldn't do it. Some
> formatting is not
> > > significant though, I think.
> >
> > Significant no, but very usefull yes. If one have to read
> the xml file it will
> > be a *lot* easier.
But adding significant whitespace could make life very difficult when
reading that XML file back in. I wouldn't like my parser to have this
side-effect just because I edit something unrelated.
> I have to agree with Christophe here - I end up perusing a lot of xml
> files by hand, and they are much easier to read when indented
> than not.
> While I realise that this is not strictly part of the specification,
> perhaps another member function such as
> Document::write_formatted_to_file would be useful for those of us who
> would like it. I can also understand Murray's hesitation to
> add "broken"
> things to libxml++.
If it's a totally different method then maybe I could accept it. But I'd
still like someone to ask on libxml about the sensibleness of it. We need to
find out for use
a) What whitespace is not significant.
b) How stupid would it be to give people the ability to explicitly choose to
add significant whitespace arbitrarily to a whole XML document when writing
it.
See also a recent mini-flamewar on desktop-devel-list gnome org Daniel gets
asked this a lot - apparently there is something about it in the libxml FAQ.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]