Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] New XPath issue: what to do with non-nodes?

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: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] New XPath issue: what to do with non-nodes?
  • Date: Wed, 12 Jan 2005 15:28:39 -0500

XOM is limiting the contents of the returned Nodes object to the usual XOM node types (Element, Attribute, Comment, Text, Document, etc.). the question therefore arise what should I do when an XPath expression return something else. In particular, it may return:

Double
String
Boolean
Internal classes such as NamespaceNode and DocumentFragment

In particular, should XOM

1. Throw an exception?

or

2. Remove the offending objects from the result list and return a potentially empty Nodes object?


--
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