[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Question regarding Xpath and streaming
- From: "Yong Chen \(yongche\)" <chen cisco com>
- To: <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] Question regarding Xpath and streaming
- Date: Wed, 27 Jun 2007 16:37:06 -0700
On the same note, is there any way to validate a document (against a
schema) which is being streamed out using xmlWriter?
"xmlSchemaValidateDoc(validCtxtPtr, doc)" needs a "doc", but when doing
streaming, I don't have the full doc available.
Thanks,
Yong Chen
> -----Original Message-----
> From: Daniel Veillard [mailto:veillard redhat com]
> Sent: Tuesday, June 26, 2007 2:38 AM
> To: Yong Chen (yongche)
> Cc: xml gnome org
> Subject: Re: [xml] Question regarding Xpath and streaming
>
> 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]