Re: [xml] creating a nodeset from a string
- From: Daniel Veillard <veillard redhat com>
- To: Aaron Patterson <aaron patterson gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] creating a nodeset from a string
- Date: Thu, 25 Sep 2008 17:21:14 +0200
On Thu, Sep 18, 2008 at 10:47:47PM -0700, Aaron Patterson wrote:
Hi! I've got an html document that I'm trying to modify using libxml.
I need to be able to take a string that contains an arbitrary set of
html tags, turn those tags in to a nodeset, and scatter them about my
existing document.
What is the best way to go about this task? Right now I'm parsing the
tags as if they are a whole new document, but that does not seem like
the correct solution to me.
Well for XML parsing we have things like 'well balanced chunk' parsing
like xmlParseBalancedChunkMemory or more clean xmlParseInNodeContext.
But we don't have equivalents for HTML parsing. The best bet is probably
to parse as an HTML document and strip the html/head/body which may be
inserted.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]