[jdom-interest] [Fwd: how does Electric XML compare against JDOM?]

Ken Rune Helland kenh at csc.no
Mon Mar 26 00:23:58 PST 2001


At 03:01 PM 3/25/2001 -0800, Matthew MacKenzie wrote:

>Would it not be reasonable to only evaluate the XPath expression if the
>String didn't appear as an Element name?  At any rate, there is probably
>an elegant way to allow XPath expressions in getChildren().  It would
>probably be ugly to do getChildren(new XPath("foo[bar = \"...\"]"), but
>its an option.
>
>The other problem with having the XPath-capable signature the same as
>the standard getChildren() is the subject of reporting problems with the
>XPath.  It would be annoying (IMO) to have a try/catch everywhere I call
>getChildren().


getChildrenByXPath() ???

This will allow you too trow exceptions and use a String as parameter
without confusion.


If you go for the getChildren(new XPath("...")) this can also
throw exceptions without affecting the other getChildren metods.


KenR

  




More information about the jdom-interest mailing list