play.libs
Class XML

java.lang.Object
  extended by play.libs.XML

public class XML
extends java.lang.Object

XML utils


Constructor Summary
XML()
           
 
Method Summary
static org.w3c.dom.Document getDocument(java.io.File file)
          Parse an XML file to DOM
static org.w3c.dom.Document getDocument(java.lang.String xml)
          Parse an XML string content to DOM
static java.lang.String serialize(org.w3c.dom.Document document)
          Serialize to XML String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XML

public XML()
Method Detail

serialize

public static java.lang.String serialize(org.w3c.dom.Document document)
Serialize to XML String

Parameters:
document - The DOM document
Returns:
The XML String

getDocument

public static org.w3c.dom.Document getDocument(java.io.File file)
Parse an XML file to DOM

Returns:
null if an error occurs during parsing.

getDocument

public static org.w3c.dom.Document getDocument(java.lang.String xml)
Parse an XML string content to DOM

Returns:
null if an error occurs during parsing.


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly