|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.util.XMLUtil
public class XMLUtil
Utility methods for standard XML operations.
Constructor Summary | |
---|---|
XMLUtil()
|
Method Summary | |
---|---|
static Element |
createCDATASection(Document doc,
String elementName,
String cdata,
Element parentElement)
Creates a new element within the XML document with the given elementName. |
static Element |
createCDATASection(String elementName,
String cdata,
Element parentElement)
Creates a new element within the owner XML document of the parentElement with the given elementName. |
static void |
createCommonElements(Document doc,
Element root,
javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Creates the common elements "client" and "common-resources-registered" under this root element which are shared by all controls. |
static Element |
createElement(Document doc,
String elementName,
String elementValue,
Element parentElement)
Creates a new element within the XML document with the given elementName. |
static Element |
createElement(String elementName,
String elementValue,
Element parentElement)
Creates a new element within the owner XML document of the parentElement with the given elementName. |
static void |
createLocalizedElements(Document doc,
Element root)
|
static String |
getElementValue(String elementName,
Element parentElement)
|
static Transformer |
getTransformer(URL url)
|
static String |
getValidStyleString(String styleString)
|
static Document |
newDocument()
Creates a new XML Document object. |
static String |
transform(Document xmlDoc,
URL url)
Transforms the xmlDoc using the xslFile and returns the transformed result as a string. |
static String |
transform(Document xmlDoc,
URL url,
Properties outputFormat)
Transforms the xmlDoc using the xslFile and returns the transformed result as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLUtil()
Method Detail |
---|
public static Document newDocument()
Document
- a new XML Documentpublic static String getElementValue(String elementName, Element parentElement)
public static Element createElement(Document doc, String elementName, String elementValue, Element parentElement)
doc
- the Document to add the new element toelementName
- the name of the new elementelementValue
- the value of the new elementparentElement
- the parent of the new element
Element
- the new element createdpublic static Element createElement(String elementName, String elementValue, Element parentElement)
elementName
- the name of the new elementelementValue
- the value of the new elementparentElement
- the parent of the new element
Element
- the new element createdpublic static Element createCDATASection(Document doc, String elementName, String cdata, Element parentElement)
doc
- the Document to add the new element toelementName
- the name of the new elementcdata
- the CDATA value of the new elementparentElement
- the parent of the new element
Element
- the new element createdpublic static Element createCDATASection(String elementName, String cdata, Element parentElement)
elementName
- the name of the new elementcdata
- the CDATA value of the new elementparentElement
- the parent of the new element
Element
- the new element createdpublic static void createCommonElements(Document doc, Element root, javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
doc
- the document to add the elements toroot
- the parent of the element to addpublic static void createLocalizedElements(Document doc, Element root)
public static String transform(Document xmlDoc, URL url)
xmlDoc
- the XML document to transformurl
- the URL of the XSL file which specifies how to transform
String
- the transformed result as a stringpublic static String transform(Document xmlDoc, URL url, Properties outputFormat)
xmlDoc
- the XML document to transformurl
- the URL of the XSL file which specifies how to transformoutputFormat
- the output properties that used for transformation
String
- the transformed result as a stringTransformer.setOutputProperties(Properties)
public static String getValidStyleString(String styleString)
public static Transformer getTransformer(URL url) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |