Re: [xml] Keeping entity references unchanged with xmlParseFile
- From: Daniel Veillard <veillard redhat com>
- To: bvh <bvh-public irule be>
- Cc: xml gnome org
- Subject: Re: [xml] Keeping entity references unchanged with xmlParseFile
- Date: Tue, 9 Dec 2003 17:36:22 -0500
On Tue, Dec 09, 2003 at 11:35:37PM +0100, bvh wrote:
On Tue, Dec 09, 2003 at 10:26:19PM +0100, bvh wrote:
However the reference entities seem to be skipped over completly. For
example for
<para>Foo à bar</para>
I get simple two text node with "Foo " and " bar" as content under the para node.
Just to be clear : I do get a node with type = XML_ENTITY_REF
but I'd like just to have everyting lumped together in one (or more) text nodes.
No, entities references are not text node this makes no sense. And entity
can contain structure, hold full chapters, etc ... they cannot be associated
to a text node.
(My bad : I should have reread this before sending) Ideally, the parser should
ignore them completly and try not to validate them to a dtd. Not sure if this
validation is irrelevant in that case.
would go against the xml standard of some sorts but from a practical POV it
seems to make sense to me.
yes it would go against all standard practice and logic behind XML.
Just the same as above I'd like them to stay in � form in one (or more)
text nodes.
makes no sense either ! How would you save that text node ? as
&#x0000;
which is not what you have in your input,
libxml2 is an XML parser, it behaves like an XML parser, sorry what you're
asking for makes no sense from an XML parsing perspective.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
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]