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/
[EMAIL PROTECTED]  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to