com.atlantbh.jmeter.plugins.xmlformatter
Class XmlUtil

java.lang.Object
  extended by com.atlantbh.jmeter.plugins.xmlformatter.XmlUtil

public class XmlUtil
extends Object

This class provides transformation string to XML Document and vice versa.


Constructor Summary
XmlUtil()
           
 
Method Summary
static Document stringToXml(String string)
          Convert string to XML Document
static String xmlToString(Document document)
          Convert XML Document to its string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtil

public XmlUtil()
Method Detail

stringToXml

public static Document stringToXml(String string)
                            throws Exception
Convert string to XML Document

Parameters:
string - - string to be converted
Returns:
- Document
Throws:
Exception - - if DocumentBuilder is not initialized

xmlToString

public static String xmlToString(Document document)
                          throws Exception
Convert XML Document to its string representation.

Parameters:
document - for conversion
Returns:
- string representation of XML Document
Throws:
Exception - - if DocumentBuilder is not initialized


Copyright © 2014. All Rights Reserved.