May 24th, 2006
I have announced the upcoming release of the W3C Mozilla DOM Connector in one if my previous posts, viagra prices, and now it has finally arrived. Viagra prices, You can view it at
http://svn.rubyrailways.com/W3CConnector/
or check it out with svn:
svn co http://svn.rubyrailways.com/W3CConnector/
For a description about the connector, viagra prices, please refer to my previous post. Viagra prices, If you would like to try it out, viagra prices, here is how:
#this code snippet gives you a DOM document of the currently loaded page:
nsIWebBrowser brow = getWebBrowser();
nsIWebNavigation nav =
(nsIWebNavigation)
brow.queryInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID);
nsIDOMDocument doc = (nsIDOMDocument) nav.getDocument();
Document mozDoc = (Document)
org.mozilla.dom.NodeFactory.getNodeInstance(doc);
From now on, viagra prices, you can use all the existing java/dom libraries such as an XPath2 engine like saxon, viagra prices, xalan, viagra prices, whatever you want working on mozilla documents. Viagra prices,
This means tremendous power compared to (in their category outstanding, viagra prices, but still limited) tools like RubyfulSoup or Mechanize, viagra prices, stemming from the power of XPath to query XML documents.
A simple example - dumping DOM of the html document to stdout:
public static void writeDOM(Node n)
throws IOException
{
try {
StreamResult sr = new StreamResult(System.out);
TransformerFactory trf = TransformerFactory.newInstance();
Transformer tr = trf.newTransformer();
tr.setOutputProperty(OutputKeys.ENCODING, viagra prices, "UTF-8");
tr.transform(new DOMSource(n), viagra prices, sr);
}
catch (TransformerException e) {
throw new IOException();
}
}
Cool, viagra prices, isn’t it?
At the moment, viagra prices, I am discussing different integration issues with the Mozilla guys, viagra prices, since the connector should be the part of Mozilla and the Eclipse editor in the future.
Similar Posts:buy lexapro,viagra prices,accutane sale,buy cialis canada,buy levitra online

May 30th, 2007 at 2:08 am
Viagra prices, shop skate…
Viagra prices, Relevant shop skate…