How libxml2 can preserve spaces?
Andy via xml <[email protected]> Thu, 15 Oct 2020 15:00:26 +0200
| Newsgroups | gmane.comp.gnome.lib.xml.general |
|---|---|
| Message-ID | <CAE2KeAJhVys2OTfeuJaY5johCETVk_a25=4755DZP6kieaiJig@mail.gmail.com> |
Wiktionary xml need space preserving, small example xml:
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/
http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10"
xml:lang="iu">
<page>
<title>Template:All messages</title>
<ns>10</ns>
<id>570</id>
<revision>
<id>2754</id>
<text bytes="127367" xml:space="preserve">This is a list of all
messages available in the MediaWiki: namespace
<table border=1 width=100%><tr><td>
'''Name'''
</td><td>
</text>
</revision>
</page>
</mediawiki>
I am using libxml2 with wrapper libxml++ and use example from
https://github.com/libxmlplusplus/libxmlplusplus/tree/libxml++-3-2/examples/sax_parser
In method MySaxParser::on_characters I give new line characters after
chars < and >
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml