[xml] namespace problem
- From: Andreas Wagner <andreaswagner7 gmail com>
- To: xml gnome org
- Subject: [xml] namespace problem
- Date: Sat, 2 Jan 2010 18:39:31 +0100
Hi folks,
i have an xml document like this:
<?xml version="1.0" ...?>
<root xmlns:Value="
http://dummies.org">
<header>
<variables>
<...../>
<...../>
</variables>
<const>
<.../>
<.../>
</const>
<parameters>
<param name="xxx">
<Value:scalar name="xxx" type="BOOL"/>
</param>
<param name="yyy">
<Value:scalar name="yyy" type="BOOL"/>
</param>
</parameters>
</header>
<body>
</body>
</root>
I can read the variables and the constants in the header, but when i want to read the Value:scalar name and type i get nothing. I read the correct lines, but the content is empty (thats normal) but the name of this element is "text".
When the current node is param i try to get the values with:
xmlChar *name;
cur = cur->xmlChildrenNode;
if (xmlGetNsProp(cur,(const xmlChar*) "name", (const xmlChar*) "Value"){
name = xmlGetNsProp(cur,(const xmlChar*) "name", (const xmlChar*) "Value");
printf("name: %s \n,name);
}
So what am i doing wrong and how can i get the name and type? I tried a lot of things but did not get any result.
Regards
Andreas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]