[xml] Problem with XML Query
- From: "Martin Landl" <nonlandi gmx at>
- To: xml gnome org
- Subject: [xml] Problem with XML Query
- Date: Mon, 28 Apr 2008 15:47:06 +0200
Hi!
I've got a problem with the following XML
<OBJECT xmlns="http://somenamespace" xmlns:ns0="http://somenamespace" myAttribute="myAttributeValue">
<STRING xmlns="http://somenamespace" xmlns:ns1="http://somenamespace" reference="COOSYSTEM 1
1:objname">stringvalue1</STRING>
<STRING xmlns="http://somenamespace" xmlns:ns2="http://somenamespace" reference="COOSYSTEM 1
1:objsubject">stringvalue2</STRING>
</OBJECT>
When I try to query the XPath "/ns1:OBJECT/@ns1:myAttribute" (having "http://somenamespace" added as "ns1")
added the query returns no nodes.
If I change the XML "myAttribute" to "ns0:myAttribute", the same XPath query returns the attribute node
properly.
Regardless of the redundant namespace declarations: Is there a problem with the above XML so that the XPath
query fails?
I am using libxml2-2.6.32
Regards,
nonlandi
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]