concept document in category groovy

appears as: document, document, documents
Groovy in Action, Second Edition

This is an excerpt from Manning's book Groovy in Action, Second Edition.

13 At www.netbeans.org/kb/docs/java/groovy-quickstart.html you’ll find a document that gets you started with Groovy in NetBeans IDE.

Getting the document

Not surprisingly, the DOM is based around the central abstraction of a document, realized as the Java interface org.w3c.dom.Document. An object of this type will hold our data store.

The Java way of retrieving a document is through the parse method of a DocumentBuilder (that is, a parser). This method takes an InputStream to read the XML from. So a first attempt at reading would look like this: