|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stimulsoft.base.utils.StiXmlHelper
public class StiXmlHelper
XML helper Copyright Stimulsoft
| Constructor Summary | |
|---|---|
StiXmlHelper()
|
|
| Method Summary | |
|---|---|
static Document |
loadXML(File file)
Parse xml file to Document
If file not foutn it tries to load from resuorces |
static Document |
loadXML(InputStream is)
|
static Document |
loadXML(String filePath)
|
static String |
serialize(Document doc)
Serialize Document to string |
static String |
serialize(Document doc,
boolean omitXMLDeclaration)
|
static String |
serialize(Document doc,
boolean omitXMLDeclaration,
boolean indent,
Element element)
Serialize Document to string |
static String |
serialize(Document doc,
boolean omitXMLDeclaration,
Element element)
|
static String |
serialize(Document doc,
Element el)
Serialize element |
static String |
validName(String value)
Check & convert non-valid XML param |
static Element |
writeElementString(Document doc,
Element element,
String elName,
String value)
Write string emenet-value to Element |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StiXmlHelper()
| Method Detail |
|---|
public static Document loadXML(String filePath)
throws ParserConfigurationException,
SAXException,
IOException
ParserConfigurationException
SAXException
IOException
public static Document loadXML(File file)
throws ParserConfigurationException,
SAXException,
IOException
Document
If file not foutn it tries to load from resuorces
filePath -
ParserConfigurationException
SAXException
IOException
public static Document loadXML(InputStream is)
throws ParserConfigurationException,
SAXException,
IOException
ParserConfigurationException
SAXException
IOException
public static String serialize(Document doc)
throws IOException,
TransformerException
Document to string
doc - Document
Document
IOException
TransformerException
public static String serialize(Document doc,
boolean omitXMLDeclaration)
throws IOException,
TransformerException
IOException
TransformerException
public static String serialize(Document doc,
boolean omitXMLDeclaration,
Element element)
throws IOException,
TransformerException
IOException
TransformerException
public static String serialize(Document doc,
boolean omitXMLDeclaration,
boolean indent,
Element element)
throws IOException,
TransformerException
Document to string
doc - DocumentomitXMLDeclaration - Omit XML declaration
IOException
TransformerException
public static String serialize(Document doc,
Element el)
throws IOException,
TransformerException
doc - Documentel - Element
IOException
TransformerExceptionpublic static String validName(String value)
value -
public static Element writeElementString(Document doc,
Element element,
String elName,
String value)
Element
doc - Current Documentelement - Current ElementelName - value -
Element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||