You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Cory Isaacson <ci...@capita2.com> on 2001/02/10 19:59:44 UTC

DOM and XPathAPI using Namespaces

If I am creating a DOM using namespaces, and I want to later use the
XPathAPI to query it, do I need to manually add the 'xmlns' attribute to the
document element (or to any context node)? In Xerces there is a
'createElementNS' method which automatically creates an element using a
namespace, but I notice that when I use XPathAPI to later find nodes it
doesn't work, because the Prefix Resolver looks for 'xmlns'.

Thanks,

Cory

RE: DOM and XPathAPI using Namespaces

Posted by "Cory Isaacson (Compuflex)" <ci...@compuflex.com>.
I tried adding the 'xmns' attribute and it does work, so I answered my own
question.

Thanks,

Cory
  -----Original Message-----
  From: Cory Isaacson [mailto:cisaacson@capita2.com]
  Sent: Saturday, February 10, 2001 11:00 AM
  To: xalan-dev@xml. apache. org
  Subject: DOM and XPathAPI using Namespaces


  If I am creating a DOM using namespaces, and I want to later use the
XPathAPI to query it, do I need to manually add the 'xmlns' attribute to the
document element (or to any context node)? In Xerces there is a
'createElementNS' method which automatically creates an element using a
namespace, but I notice that when I use XPathAPI to later find nodes it
doesn't work, because the Prefix Resolver looks for 'xmlns'.

  Thanks,

  Cory