[xml] using ID attribute in libxml

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
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]