Re: [xml] Preserve Whitespace in Attribute List



On Wed, May 02, 2007 at 02:29:22PM -0400, Dan Ryan wrote:
Is it possible to preserve whitespace in an attribute list?
In the example below their are 2 attribute name/value pairs,
each appearing on separate lines.
<team>
 <name>Syracuse</name>
 <coaches  head="Boehiem"
           assist="Fine"/>
</team>

  No, that's not part of the XML information set.
    http://www.w3.org/TR/xml-infoset/
even the order of attributes is not part of it, though libxml2
tries to preserve it.
I don't know any parser API which would preserve that information.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]