Did I read something wrong?  My understanding is that

getElementsByTagName("namespace:localName")

will always return the same result as

getElementsByTagNameNS("namespace", "localName")

Is this right?  I am not seeing these results using the latest 1.0.2.

For this document:

<?xml version="1.0"?>

<!DOCTYPE JavaXML:xmlrpc-config SYSTEM
"E:\projects\XML-Book\WEB-INF\conf\XMLRPC.dtd">

<JavaXML:xmlrpc-config
xmlns:JavaXML="http://www.oreilly.com/catalog/javaxml";>

  <!-- Configuration Information for Server and Clients -->
  <JavaXML:hostname>localhost</JavaXML:hostname>
  <JavaXML:port type="unprotected">85</JavaXML:port>

  <!-- Server Specific Configuration Information -->
  <JavaXML:xmlrpc-server>

    <!-- List of XML-RPC handlers to register -->
    <JavaXML:handlers>
      <JavaXML:handler>
        <JavaXML:identifier>hello</JavaXML:identifier>
        <JavaXML:class>com.oreilly.xmlrpc.HelloHandler</JavaXML:class>
      </JavaXML:handler>

      <JavaXML:handler>
        <JavaXML:identifier>scheduler</JavaXML:identifier>
        <JavaXML:class>com.oreilly.xmlrpc.Scheduler</JavaXML:class>
      </JavaXML:handler>
    </JavaXML:handlers>

  </JavaXML:xmlrpc-server>

</JavaXML:xmlrpc-config>

this code:

DOMParser parser = new DOMParser;
parser.parse(uri);
Document doc = parser.getDocument();
Element root = doc.getDocumentElement();

NodeList nodes = root.getElementsByTagName("JavaXML:handler");

works fine (the last line in particular) but this doesn't:

NodeList nodes = root.getElementsByTagNameNS("JavaXML", "handler");

Any ideas on what the deal is?

Thanks

-----
Brett McLaughlin
Metro Information Systems
Work: (972) 724-3161
Mobile: (817) 825-7187

Reply via email to