Re: [xml] How do you detect if a xml file has a root node??
- From: Daniel Veillard <veillard redhat com>
- To: "Kali, Jayashree" <jayashree kali wachovia com>
- Cc: xml gnome org
- Subject: Re: [xml] How do you detect if a xml file has a root node??
- Date: Sat, 24 Mar 2007 02:59:25 -0400
On Fri, Mar 23, 2007 at 05:25:47PM -0400, Kali, Jayashree wrote:
Thanks for your instant reply. But my requirement is if the first node
is the main node containing other nodes I need to ignore it. But if it
contains that data then I need to include it.
From an XML point of view the parser cannot ignore it. Either you
detect and ignore it at your level after parsing (and it's dependant on
how you process the data) or you have to get it stripped out with non-XML
tools before handling it to the parser. I don't see any other possibilities
and in either case, it's fully dependant on how your code work, not on
how libxml2 works.
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]