xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <cam-batik-us...@aka.mcc.id.au>
Subject Re: Getting a node by its XPath
Date Fri, 19 Aug 2005 17:25:59 GMT
Hi Bader.

bader houmad:
> Is there a way to get a node by its XPath in an svg document?

The SVG 1.2 draft indicates that DOM Level 3 XPath support will be
required for version="1.2" documents.  Batik has this implemented, so if
you don't mind it being Batik specific, you can use that.  Though since
you mention DOM4J, I guess you want to use it from Java anyway.

The org.apache.batik.dom.AbstractDocument class implements the
XPathEvaluator interface described here:

  http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html

You can cast your Document to an org.w3c.dom.xpath.XPathEvaluator object
to use these methods.

Cameron

-- 
  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message