[gdome] how to point to an element in the DOMtree?
- From: Sameer Oak <sameer oak airtightnetworks net>
- To: gdome <gdome gnome org>
- Cc: Luca Padovani <lpadovan cs unibo it>
- Subject: [gdome] how to point to an element in the DOMtree?
- Date: 18 May 2005 14:39:48 +0530
The test programs are great help, indeed. They helped me in generating
an xml file with clear understanding of what a particular DOM-API does.
I ve one doubt.
I could succefully construct one .xml file. I need to extract the
attributs(the name:value ordered pairs) for a certain attribute of a
certain element.
I could figure out two ways,
1> using xpath,
2> manually walking through the DOM tree.
In either case, one needs to locate the respective element of the DOM
tree.
By calling gdome_doc_documentElement() API, one can get a pointer to the
document which should be a valid .xml file. The return value is of type
GdomeElement *.
But, I am not being able to figure out the way how can I locate to the
root element of the DOM tree, and Also, for that matter, some other
element which is a child element of some element?
For instance, given the DOMtree hierarchy is of the form
<root>
<header/>
<!-- ... represents list of attributes(name=value pairs) -->
<data .../>
</root>
how can I point to elements "root" and "data"?
Kindly help.
Regards,
Sam Oak.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]