Re: [xml] Question regarding Xpath and streaming
- From: Daniel Veillard <veillard redhat com>
- To: "Yong Chen (yongche)" <chen cisco com>
- Cc: xml gnome org
- Subject: Re: [xml] Question regarding Xpath and streaming
- Date: Tue, 26 Jun 2007 05:37:30 -0400
On Mon, Jun 25, 2007 at 06:24:46PM -0700, Yong Chen (yongche) wrote:
Hi,
I've a question regarding xpath and streaming (xmlWriter):
I use xpath to filter a document so I get selected (or filtered) nodes.
I also use xmlWriter to stream output. I wonder if I can use both
together.
Libxml xpath works by first getting xmlXpathContextPtr (API:
xmlXpathNewContext(doc)), this means the document (doc) has to be
available. But if I'm streaming the data into a file
(xmlNewTextWriterFilename()), I don't have the doc available. So how can
I apply the xpath filtering in xmlWriter streaming?
Normal XPath operations require a full tree.
There is a pattern module allowing to stream for a very small subset of
XPath, see http://xmlsoft.org/html/libxml-pattern.html , but I don't have
user friendly docs for it.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
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]