patch applied (packages/HaXml): Add a -n cmd-line option to Xtract.
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Wed May 30 08:56:54 EDT 2007
Wed May 30 05:44:08 PDT 2007 Malcolm.Wallace at cs.york.ac.uk
* Add a -n cmd-line option to Xtract.
With -n, the output converts entities like < to their textual
equivalents e.g. <. This applies to _all_ nested textual content within
elements (and in attributes too), making the output not strictly
XML-conformant, but more human-readable.
As a consequence of the way this is implemented, it also fixes an output
problem that used to occur with adjacent text and entities, where they
would appear on separate lines, e.g.
don
'
t
Now, all text is 'unescape'd internally during the query, and only
'escape'd again at the output stage (if -n is _not_ present). The
net result is that the previous example now looks more correct:
don't
M ./src/Text/XML/HaXml/Xtract/Parse.hs -2 +10
M ./src/tools/Xtract.hs -6 +13
More information about the Cvs-libraries
mailing list