[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Searching in reader API
- From: Daniel Veillard <veillard redhat com>
- To: divij <divij innomedia co in>
- Cc: xml gnome org
- Subject: Re: [xml] Searching in reader API
- Date: Fri, 17 Apr 2009 11:03:08 +0200
On Sat, Feb 28, 2009 at 05:10:55PM +0530, divij wrote:
> Hi All,
> Here I am having one large xml file having the entries (apprx
> 5000 records), the records also contain the UNICODE characters. Now, I
> directly want to search that record (with the case of partial matching
> also if possibles).
> Is there any way in libxml/reader API to search specific record.
>
> Example:-
>
> <record-set>
> <record>BBC News Monday</record>
> <record>BBC News Tuesday/record>
> <record>BBC News Wednesday</record>
> <record>BBC News Thusday</record>
> <record>BBC News Friday</record>
> <record>BBC News saturday</record>
> </record-set>
>
> Now if suppose I directly want to search the record BBC News Friday is
> it possible to do by any which way in libxml.
Don't use the reader, build a full tree instead and use XPath
/record-set/record[. = "BBC News Friday"]
See http://www.w3.org/TR/xpath#path-abbrev etc.
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]