Re: [xml] ID attribute in xml
- From: Cory Nelson <phrosty gmail com>
- To: Kedar Joshi <kpjoshi gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] ID attribute in xml
- Date: Sat, 6 Nov 2004 13:46:14 -0800
Have you tried using XPath?
On Sat, 6 Nov 2004 15:47:18 -0500, Kedar Joshi <kpjoshi gmail com> wrote:
Using libxml, I am creating the DOM tree from a parsed XML file. What
i need is to get the pointer to some NODE in the tree from an ID
attribute asigned in the XML file.
Do i have to create the hash table of attributes on my own or is it
created by the following calls, or in any other way?
..
xmlDocPtr doc;
xmlNodePtr cur;
...
/*
* build an XML tree from a the file;
*/
doc = xmlParseFile(filename);
cur = xmlDocGetRootElement(doc);
....
here is the structure of xmlDocPtr
typedef xmlDoc *xmlDocPtr;
struct _xmlDoc {
.
.
void *ids; /* Hash table for ID attributes if any */
void *refs; /* Hash table for IDREFs attributes if any */
.
.
};
thanks,
Kedar
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
--
Cory Nelson
http://www.int64.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]