From: David S. <ds...@vi...> - 2005-11-18 14:47:05
|
On Fri, 18 Nov 2005, Michael B Allen wrote: > But now I've noticed something odd. The following command appears to work: > > $ cat hashmap.xml | xml sel -t -c "@*|node()" -m "/|@*|node()" > out.xml > > I expected the result to be identical to the input. But it's not: > > $ diff hashmap.xml out.xml > 1,2d0 > < <?xml version="1.0"?> > < > 57c55 > < The following example illustrates how to initialize a > <ident>hashmap</ident> and use it to store the object <tt>data</tt> > associated with the character string "name". > --- > > The following example illustrates how to initialize a > > <ident>hashmap</ident> and use it to store the object <tt>data</tt> > > associated with the character string "name". > > Is this normal? In the XML world, per the standards (as I understand them), it is considered synonymous to use direct characters, numeric character entities, or the pre-defined XML character entities (" ' etc.) to represent a character. So in formal terms the XML output with the "" marks is identical to the input with ". DS -- David Sewell, Editorial and Technical Manager Electronic Imprint, The University of Virginia Press PO Box 400318, Charlottesville, VA 22904-4318 USA Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903 Email: ds...@vi... Tel: +1 434 924 9973 Web: http://www.ei.virginia.edu/ |