[xml] ID attribute in xml
- From: Kedar Joshi <kpjoshi gmail com>
- To: xml gnome org
- Subject: [xml] ID attribute in xml
- Date: Sat, 6 Nov 2004 15:47:18 -0500
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]