Package xj3d.filter.ui
Class XMLUtils
java.lang.Object
xj3d.filter.ui.XMLUtils
Utility methods for handling XML files
- Version:
- $Revision: 1.0 $
- Author:
- Rex Melton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Document
Create and return a new empty xml DOM objectstatic Document
getDocument
(File file, boolean nsaware, Schema schema) Create and return a new xml DOM object parsed from the argumentFile
static Document
getDocument
(URL url, boolean nsaware, Schema schema) Create and return a new xml DOM object parsed from the argumentURL
static void
printNode
(Node node, PrintStream stream) Print out a document node to the specifiedPrintStream
.static void
putDocument
(Document doc, File file) Write out the argument document to the specified URI
-
Constructor Details
-
XMLUtils
public XMLUtils()
-
-
Method Details
-
getDocument
Create and return a new xml DOM object parsed from the argumentURL
- Parameters:
url
- The documentURL
nsaware
- Enable or disable namespace awarenessschema
- The schema to use if validating while parsing- Returns:
- A new xml DOM object parsed from the argument
URL
, ornull
if one cannot be created.
-
getDocument
Create and return a new xml DOM object parsed from the argumentFile
- Parameters:
file
- The documentFile
nsaware
- Enable or disable namespace awarenessschema
- The schema to use if validating while parsing- Returns:
- A new xml DOM object parsed from the argument
File
, ornull
if one cannot be created.
-
createNewDocument
Create and return a new empty xml DOM object- Returns:
- a new empty xml DOM object, or
null
if one cannot be created.
-
putDocument
-
printNode
Print out a document node to the specifiedPrintStream
.- Parameters:
node
- the document node.stream
- the outputPrintStream
-