Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1: XPath

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Thu, 06 Jan 2005 17:55:29 -0500

John Cowan wrote:

Neither XOM nor XPath has any notion of the default namespace (an NCName
in an XPath refers to the namespace named "", not anything else --
a frequent source of bugs in XPaths).


My point here is that when querying a document that uses the default namespace (e.g. XHTML) you have to use a prefix in the XPath expression, and that prefix will generally not be declared in the document you're querying, so some additional namespace binding is required, especially if you don't want to modify the document being queried. Sorry if I didn't say that quite right the first time, but that's the issue: how do you query a document that uses default namespaces.


--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page