List Info

Thread: Line ending style on Windows




Line ending style on Windows
user name
2006-08-21 17:22:12

I'm using the Windows binaries of libxml as provided by Igor Zlatkovic (version 2.6.26).

When I call xmlSaveFormatFileEnc it saves the XML file using line feeds.
Is it possible to configure the line ending style to carriage return + line feed?

Thank you,

- Rob Laveaux


--------------------------------------------------------

Pluggers Software

Thijssestraat 203

2521 ZG  Den Haag

The Netherlands


Email: pluggers.nl">rob.laveauxpluggers.nl

Website: http://www.pluggers.nl


--------------------------------------------------------



Line ending style on Windows
user name
2006-08-21 18:32:19
On Mon, Aug 21, 2006 at 07:22:12PM +0200, Rob Laveaux wrote:
> 
> I'm using the Windows binaries of libxml as provided
by Igor  
> Zlatkovic (version 2.6.26).
> 
> When I call xmlSaveFormatFileEnc it saves the XML file
using line feeds.
> Is it possible to configure the line ending style to
carriage return  
> + line feed?

  No, 1/ XML parser must convert on input
         http://ww
w.w3.org/TR/REC-xml/#sec-line-ends
      2/ when serializing an XML toolkit won't add extra
characters to
         the document

Clearly XML tools should have no problem processing the
output and
libxml2 behaviour is the correct one.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
Line ending style on Windows
user name
2006-08-22 11:54:15
On 21-aug-2006, at 20:32, Daniel Veillard wrote:

>   No, 1/ XML parser must convert on input
>          http://ww
w.w3.org/TR/REC-xml/#sec-line-ends
>       2/ when serializing an XML toolkit won't add
extra characters to
>          the document

Hi Daniel,

Thanks for your answer. I understand libxml is strictly
following the  
specs.

Still it would be nice if this was a configurable setting.
I know other libraries such as Xerces and MS XML offer this
as a  
setting.

Thanks again,

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Thijssestraat 203
2521 ZG  Den Haag
The Netherlands

Email: rob.laveauxpluggers.nl
Website: http://www.pluggers.nl

--------------------------------------------------------


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
Line ending style on Windows
user name
2006-08-22 12:25:11
On Tue, Aug 22, 2006 at 01:54:15PM +0200, Rob Laveaux wrote:
> 
> On 21-aug-2006, at 20:32, Daniel Veillard wrote:
> 
> >   No, 1/ XML parser must convert on input
> >          http://ww
w.w3.org/TR/REC-xml/#sec-line-ends
> >       2/ when serializing an XML toolkit won't
add extra characters to
> >          the document
> 
> Hi Daniel,
> 
> Thanks for your answer. I understand libxml is strictly
following the  
> specs.
> 
> Still it would be nice if this was a configurable
setting.
> I know other libraries such as Xerces and MS XML offer
this as a  
> setting.

  Humpf ... for the xmlSave* functions that could be added
as one
xmlSaveOption, XML_SAVE_EOL_CRLF, but I'm not fond of this
really
this mean you have to check every character in every text
node. This
would require changes to the xmlWriter too, to be
consistent. Lot of
work and I really don't see the point, if people edit XML
by hand,
they better know what they are doing and using a decent
editor is
a basic requirement to do so. And if not editing by hand,
that should
be handled by an XML parser and that won't change anything.
  Sounds a lot of tricky and relatively expensive work for
very little
benefit.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )