org.gcube.portlets.admin.fulltextindexportlet.gwt.server.util
Class XMLUtils

java.lang.Object
  extended by org.gcube.portlets.admin.fulltextindexportlet.gwt.server.util.XMLUtils

public class XMLUtils
extends Object

Utility class for XML

Author:
Panagiota Koltsida, NKUA

Constructor Summary
XMLUtils()
           
 
Method Summary
static String createStringFromDomTree(Node tree)
          This method converts a node of a tree to a string representation.
static Document parseXMLFileFromInputStream(InputStream in)
           
static Document parseXMLFileToDOM(String XMLdoc)
          This method parses a string using the Document Builder parser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtils

public XMLUtils()
Method Detail

parseXMLFileToDOM

public static Document parseXMLFileToDOM(String XMLdoc)
                                  throws ParserConfigurationException,
                                         SAXException,
                                         IOException
This method parses a string using the Document Builder parser

Parameters:
XMLdoc: - the string to parse
Returns:
the parsed document
Throws:
ParserConfigurationException
SAXException
IOException

createStringFromDomTree

public static String createStringFromDomTree(Node tree)
                                      throws TransformerException
This method converts a node of a tree to a string representation.

Parameters:
tree: - The node of a document that will be transformed
Returns:
A string representation of the node
Throws:
TransformerException - failed to transform the DOMTree to String

parseXMLFileFromInputStream

public static Document parseXMLFileFromInputStream(InputStream in)
                                            throws SAXException,
                                                   IOException,
                                                   ParserConfigurationException
Throws:
SAXException
IOException
ParserConfigurationException


Copyright © 2014. All Rights Reserved.