OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
XPath search problem

I'm having a problem getting a .NET XMLDocument to give me back the set
of nodes I want.  The relevant code looks like this:
Dim nl as XMLNodelist
Dim nsm as XMLNamespaceManager
Code']/codeEntry", nsm)
I have created the NamespaceManager and added to it every namespace
mentioned in the XML document.  The SelectNodes always returns an empty
nodelist, unless I reduce it to a trivial Xpath expression like "//*",
which is not much use.  If I use this exact same Xpath expression in
Altova XMLSpy, it works perfectly and gives me the exact set of nodes I
want.  I'm almost sure that it is the multiple namespaces that are
somehow getting in the way here, but I can't see what's happening.  Here
is the first part of the XML document - sorry about the formatting.
There definitely is a <CodeListDictionary> element further down that has
a gml:id='LanguageCode'.  Anyone know what's happening here?

<?xml version="1.0" encoding="UTF-8"?>
<CT_CodelistCatalogue xmlns="http://www.isotc211.org/2005/gmx";
  xsi:schemaLocation="http://www.isotc211.org/2005/gmx ../gmx/gmx.xsd
http://www.isotc211.org/2005/gco ../gco/gco.xsd
http://www.opengis.net/gml ../gml/gml.xsd http://www.w3.org/1999/xlink

<!--=====Catalogue description=====-->
    <gco:CharacterString>Codelists for description of metadata datasets
compliant with ADO_DM_MDP Version 1.0.2</gco:CharacterString>
    <gco:CharacterString>GMX (and imported)

<!--============================= Codelists
<!--=== DP_DateTypeCode ===-->

  <CodeListDictionary gml:id="DP_DateTypeCode">
    <gml:description>identification of when a given event
      <CodeDefinition gml:id="DP_DateTypeCode_creation">
        <gml:description>date identifies when the resource was brought
into existence</gml:description>
        <gml:identifier codeSpace="ADO_DM_MDP">creation</gml:identifier>

      <CodeDefinition gml:id="DP_DateTypeCode_publication">
        <gml:description>date identifies when the resource was

      <CodeDefinition gml:id="DP_DateTypeCode_revision">
        <gml:description>date identifies when the resource was examined
or re-examined and imporved or amended</gml:description>
        <gml:identifier codeSpace="ADO_DM_MDP">revision</gml:identifier>

.....and so on

SKM is committed to working with its clients to deliver a sustainable future for all. Please consider the environment before printing this e-mail.
Notice - This message contains confidential information intended only for the exclusive use of the addressee named above. No confidentiality is waived or lost by any mistaken transmission to you. If you have received this message in error please delete the document and notify us immediately. 
Any opinion, text, documentation or attachment received is valid as at the date of issue only. The recipient is responsible for reviewing the status of the transferred information and should advise us immediately upon receipt of any discrepancy.  
All email sent to SKM will be intercepted, screened and filtered by SKM or its approved Service Providers.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS