Hello
I have the following xml-document
<
xml version="1.0" encoding="utf-8" ><DIDL xmlns="urn:mpeg:mpeg21:2002:02-DIDL-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<
Item><
Descriptor><
Statement mimeType="text/xml"><SomeXML/>
</
Statement></
Descriptor></
Item></
DIDL>in the XmlNode node.
When I
ns =
new XmlNamespaceManager(new NameTable());ns.AddNamespace(
"mpeg7", "urn:mpeg:mpeg7:schema:2001"); // used in SomeXmlns.AddNamespace(
"didl","urn:mpeg:mpeg21:2002:02-DIDL-NS");ns.AddNamespace(
"dia", "urn:mpeg:mpeg21:2003:01-DIA-NS" ); // used in SomeXmlns.AddNamespace(
"xsi","http://www.w3.org/2001/XMLSchema-instance"); string xpath ="/didl:DIDL/didl:Item/didl:Descriptor/didl:Statement"
; XmlNode hresNode = node.SelectSingleNode(xpath, ns);execute this code, I get the Statement node.
If I change the x-path expression to:
string xpath ="/didl:DIDL/didl:Item/didl:Descriptor/didl:Statement[@didl:mimeType='text/xml']"
;it does not work anymore.
Thanks for your suggestions,
MT

xpath won't give back xml-node when attribute is added
mahricky
MT
randy.liden
"/didl:DIDL/didl:Item/didl:Descriptor/didl:Statement[@mimeType='text/xml']";
Pete Claar
Any other suggestions
MT
Roman Benko
"/didl:DIDL/didl:Item/didl:Descriptor/didl:Statement[mimeType='text/xml']";