[xml] more document fragment issues
- From: Aaron Patterson <aaron patterson gmail com>
- To: xml gnome org
- Subject: [xml] more document fragment issues
- Date: Tue, 2 Feb 2010 11:27:03 -0800
When parsing HTML document fragments (via xmlParseInNodeContext),
libxml2 seems to add surrounding p tags to dangling text fields.
For example, parsing a fragment like this: "sir<div>phil</div>collins"
will result in 3 text nodes and 3 element nodes when using an HTML
document. However, if you're using an XML document, the fragment will
result in 3 text nodes and only one element node. This doesn't seem
like correct behavior.
I've put together a sample program that uses the latest git builds:
Are there any bits I can twiddle to deal with this? Thanks!
] [Thread Prev