Copying XML input to output verbatim in Haskell -


as per title. application user-written configuration files might time time have updated in parts otherwise should unchanged. starting point able pass input output unchanged.

i accept inputs <tag></tag> , <tag/> pretty equivalent , won't distinguished on output other that, i'd preserve xml as possible.

the first attempt text.xml.haxml.sax.saxparse suppresses whitespace after comment example:

<!-- next section: --> <section>     ... </section> 

is parsed as:

<!-- next section: --><section>     ... </section> 

which unacceptable change. next attempt via hxt @ http://pastebin.com/qnyvubk7 , works quite except entities in attribute data munged; e.g.,

<view uid="&label;" ifnotnull="&term;"> 

becomes

<view uid="&amp;label;" ifnotnull="&amp;term;"> 

even though entities in normal textual data passed correctly. can suggest how fix last problem, or way achieve objective?

it seems https://hackage.haskell.org/package/roundtrip-xml-0.2.0.0 might can't find documentation on how use it.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -