|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.fw.util.EboXmlUtil
EboXmlUtil
in com.novell.afw.util.
Utilities for dealing with XML
Constructor Summary | |
EboXmlUtil()
Deprecated. |
Method Summary | |
static void |
addDirectiveToXSL(Document xslDom,
String directiveName,
String attributeName,
String attributeValue)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
addNodeBeforeSibling(Node siblingNode,
String nodeName,
Node content)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
addNodeBeforeSibling(Node siblingNode,
String nodeName,
Node content,
boolean contentIsLocal)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
appendChildNode(Node parentNode,
Node contentNode)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
appendChildNode(Node parentNode,
Node contentNode,
boolean contentIsLocal)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Attr |
createAttribute(Document doc,
String attributeName,
String attributeValue)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Attr |
createAttribute(Element el,
String attributeName,
String attributeValue)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createCDATANode(Node parentNode,
String nodeName,
String content)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createChildNode(Node parentNode,
String nodeName)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createChildNode(Node parentNode,
String nodeName,
Node contentNode)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createChildNode(Node parentNode,
String nodeName,
Node contentNode,
boolean contentIsLocal)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Document |
createDocument()
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Document |
createDocument(InputSource inputSrc,
boolean isValidating,
boolean isNamespaceAware,
ErrorHandler errorHandler,
EntityResolver entityResolver)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Document |
createDocument(InputStream stream)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Document |
createDocument(InputStream stream,
String encoding,
boolean validation,
boolean namespace)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Document |
createDocument(String strDoc)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Document |
createDocument(URL documentURL)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createDocumentRootNode(Document parentDocument,
String nodeName,
Node contentNode)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createDocumentRootNode(Document parentDocument,
String nodeName,
Node contentNode,
boolean contentIsLocal)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createNode(Document document,
String nodeName,
Node contentNode)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createNode(Document document,
String nodeName,
Node contentNode,
boolean contentIsLocal)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createTextNode(Document doc,
Node parentNode,
String nodeName,
String content)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Node |
createTextNode(Node parentNode,
String nodeName,
String content)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Attr |
getAttribute(String attributeName,
Node node)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static String |
getAttributeValue(String attributeName,
Node node)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static DocumentBuilder |
getBuilder()
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static DocumentBuilder |
getBuilder(boolean validation,
boolean nameSpaceAware)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Transformer |
getTransformer()
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Transformer |
getTransformer(Document doc)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Transformer |
getTransformer(Properties transProps)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Transformer |
getTransformer(Source strSource)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static Transformer |
getTransformer(Templates templates)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static String |
serialize(Document doc)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static void |
serialize(Document doc,
OutputStream output)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static void |
serialize(Document doc,
OutputStream output,
Transformer transformer)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static String |
serialize(Document doc,
Transformer transformer)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static void |
serialize(Document doc,
Writer writer)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static void |
serialize(Document doc,
Writer writer,
Transformer transformer)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
static void |
xslTransform(Document contentDom,
Document styleDom,
Writer out)
Deprecated. See EboXmlUtil in com.novell.afw.util. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public EboXmlUtil()
Method Detail |
public static DocumentBuilder getBuilder() throws ParserConfigurationException
EboXmlUtil
in com.novell.afw.util.
public static DocumentBuilder getBuilder(boolean validation, boolean nameSpaceAware) throws ParserConfigurationException
EboXmlUtil
in com.novell.afw.util.
validation
- true if validation should be turned on, otherwise use falsenameSpaceAware
- true if name space awareness should be turned on, otherwise use falsepublic static Document createDocument() throws DOMException, ParserConfigurationException
EboXmlUtil
in com.novell.afw.util.
public static Document createDocument(String strDoc) throws DOMException, IOException, SAXException, ParserConfigurationException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
strDoc
- the string representing the xmlpublic static Document createDocument(InputStream stream) throws DOMException, IOException, SAXException, ParserConfigurationException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
stream
- the InputStream that represents the XML Contentpublic static Document createDocument(InputStream stream, String encoding, boolean validation, boolean namespace) throws DOMException, IOException, SAXException, ParserConfigurationException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
stream
- the stream (InputStream,...) to represent the XMLencoding
- the Char encoding that should be used to read from the streamnamespace
- use namespace awareness (true) , or not (false)validation
- use validation (true), or not (false)public static Document createDocument(URL documentURL) throws IOException, SAXException, ParserConfigurationException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
documentURL
- the URL pointing to the Documentpublic static Document createDocument(InputSource inputSrc, boolean isValidating, boolean isNamespaceAware, ErrorHandler errorHandler, EntityResolver entityResolver) throws DOMException, IOException, SAXException, ParserConfigurationException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
inputSrc
- the InputSource representing the xmlisValidating
- the boolean determining if validating is used against the xmlisNamespaceAware
- the boolean determining if the NameSpaceAware feature is seterrorHandler
- the ErrorHandler to be used if suppliedentityResolver
- the entityResolver to be used if suppliedpublic static Node createDocumentRootNode(Document parentDocument, String nodeName, Node contentNode) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentDocument
- the Document that will receive the new Element and the contentnodeName
- the name of the Element to createcontentNode
- the Node that will be appended as a child to the created Elementpublic static Node createDocumentRootNode(Document parentDocument, String nodeName, Node contentNode, boolean contentIsLocal) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentDocument
- the Document that will receive the new Element and the contentnodeName
- the name of the Element to createcontentNode
- the Node that will be imported (if external) or appended (if local) as a child to the created Element (incl. subtree)contentIsLocal
- a boolean indicating wether the contentNode is external to the document and has to be imported (false), or if it can be appended (true)public static Node createNode(Document document, String nodeName, Node contentNode) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
document
- Document used to create the Element (not null!)nodeName
- name of the node to be created (not null!)contentNode
- content in form of a Node to be appended as child (if not null) ; including the subtreepublic static Node createNode(Document document, String nodeName, Node contentNode, boolean contentIsLocal) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
document
- Document used to create the Element (not null!)nodeName
- name of the node to be created (not null!)contentNode
- content in form of a Node to be imported or appended as child (if not null)contentIsLocal
- a boolean indicating wether the contentNode is external to the document and has to be imported (false), or if it can be appended (true)public static Node createChildNode(Node parentNode, String nodeName, Node contentNode) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentNode
- the parent Node (not null!)nodeName
- the name for the new Element (not null!)contentNode
- org.w3c.dom.Node that contains the content to be appended (incl. subtree) to the parent Document (or null)public static Node createChildNode(Node parentNode, String nodeName, Node contentNode, boolean contentIsLocal) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentNode
- the parent Node (not null!)nodeName
- the name for the new Element (not null!)contentNode
- org.w3c.dom.Node that contains the content to be imported (incl. subtree) or appended (if local) to the parent Document (or null)contentIsLocal
- a boolean indicating wether the contentNode is external to the document and has to be imported (false), or if it can be appended (true)public static Node createChildNode(Node parentNode, String nodeName) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
nodeName
- the name for the new nodeparentNode
- the parent org.w3c.dom.Node that will receive the childpublic static Node createTextNode(Document doc, Node parentNode, String nodeName, String content) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- the Document to contain the new text node (not null!)parentNode
- the Node under which the new text node should be placed (or null)nodeName
- the name of the new text node (not null!)content
- the text itselfpublic static Node createTextNode(Node parentNode, String nodeName, String content) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentNode
- the Node under which the new text node should be placed (not null!)nodeName
- the name of the new text node (not null!)content
- the text itselfpublic static Attr createAttribute(Element el, String attributeName, String attributeValue) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
el
- the element that will receive the attribute (not null!)attributeName
- name of the attribute to be created (not null!)attributeValue
- value of the attribute to be createdpublic static Attr createAttribute(Document doc, String attributeName, String attributeValue) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- the Document used to create the attributeattributeName
- name of the attribute to be createdattributeValue
- value of the attribute to be createdpublic static String getAttributeValue(String attributeName, Node node) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
attributeName
- the name of the attribute you want to getnode
- the Node where the attribute livespublic static Attr getAttribute(String attributeName, Node node) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
attributeName
- the name of the attribute you want to getnode
- the Node where the attribute livespublic static Node createCDATANode(Node parentNode, String nodeName, String content) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentNode
- Node (parent) of the element to be created (not null!)nodeName
- the name you want to give your Node (or null if the textnode should be appended to the parent node directly)content
- the content of the node (the text)public static Node addNodeBeforeSibling(Node siblingNode, String nodeName, Node content) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
siblingNode
- the node that will be used as reference; the new element will be inserted before this nodenodeName
- the name of the element to createcontent
- any subtree that will be appended as child of the new element (if != null)public static Node addNodeBeforeSibling(Node siblingNode, String nodeName, Node content, boolean contentIsLocal) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
siblingNode
- the node that will be used as reference; the new element will be inserted before this nodenodeName
- the name of the element to createcontent
- any subtree that will be imported or appended (if local) as child of the new element (if != null)contentIsLocal
- a boolean indicating wether the contentNode is external to the document and has to be imported (false), or if it can be appended (true)public static Node appendChildNode(Node parentNode, Node contentNode) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentNode
- the Node under which the content should be placed (not null!)contentNode
- the Node (not null!) that will be imported as a child to the created Node (incl. subtree)public static Node appendChildNode(Node parentNode, Node contentNode, boolean contentIsLocal) throws IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
parentNode
- the Node under which the content should be placed (not null!)contentNode
- the Node (not null!) that will be imported as a child to the created Node (incl. subtree)contentIsLocal
- a boolean indicating wether the contentNode is external to the document and has to be imported (false), or if it can be appended (true)public static void serialize(Document doc, OutputStream output) throws IOException, TransformerConfigurationException, TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- the Document to be serializedoutput
- the OutputStream to write topublic static void serialize(Document doc, OutputStream output, Transformer transformer) throws IOException, TransformerConfigurationException, TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- the Document to be serializedoutput
- the OutputStream to write totransformer
- the transformer to usepublic static void serialize(Document doc, Writer writer) throws IOException, TransformerConfigurationException, TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- Document to be serializedwriter
- the writer to write topublic static void serialize(Document doc, Writer writer, Transformer transformer) throws IOException, TransformerConfigurationException, TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- Document to be serializedwriter
- the writer to write totransformer
- the transformer to usepublic static String serialize(Document doc) throws IOException, TransformerConfigurationException, TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- Document to be serializedpublic static String serialize(Document doc, Transformer transformer) throws IOException, TransformerConfigurationException, TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
doc
- Document to be serializedtransformer
- the transformer to usepublic static void addDirectiveToXSL(Document xslDom, String directiveName, String attributeName, String attributeValue) throws TransformerException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
xslDom
- the DOM representation of the XSL style sheetdirectiveName
- the tag name (like xsl:import)attributeName
- theattributeValue
- public static void xslTransform(Document contentDom, Document styleDom, Writer out) throws TransformerException, TransformerConfigurationException, FileNotFoundException, IOException, IllegalArgumentException
EboXmlUtil
in com.novell.afw.util.
contentDom
- the document to be transformedstyleDom
- the style to apply to the contentout
- the writer to write the result topublic static Transformer getTransformer() throws TransformerConfigurationException
EboXmlUtil
in com.novell.afw.util.
public static Transformer getTransformer(Properties transProps) throws TransformerConfigurationException
EboXmlUtil
in com.novell.afw.util.
transProps
- a Porperties file containing the desired Output propertiespublic static Transformer getTransformer(Source strSource) throws TransformerConfigurationException
EboXmlUtil
in com.novell.afw.util.
strSource
- a Source (StreamSource, DOMSource, SAXSource) representing the style we need the Transformer forpublic static Transformer getTransformer(Templates templates) throws TransformerConfigurationException
EboXmlUtil
in com.novell.afw.util.
templates
- the pre compile xsl style sheetpublic static Transformer getTransformer(Document doc) throws TransformerException, IOException
EboXmlUtil
in com.novell.afw.util.
doc
- a document representing the style we need the Transformer for
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |