[xml] using ID attribute in libxml
- From: "Akshay kumar" <akshay40 hotmail com>
- To: xml gnome org
- Subject: [xml] using ID attribute in libxml
- Date: Tue, 10 Apr 2001 15:02:27 +0530
HI all
i am using libxml2-2.3.1-1
to parse an XML file i am creating the DOM tree form the parsed file
what i need is to get the pointer to some ELEMENT 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
does following libxml parser calls automatically fills up the hash table in
the document root node
..
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 */
.
.
};
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]