|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.init.its.util.XMLUtil
public class XMLUtil
Some useful XML utils
Constructor Summary | |
---|---|
XMLUtil()
|
Method Summary | |
---|---|
static boolean |
containsAttributeWithPrefix(org.w3c.dom.Node node,
java.lang.String prefix)
Returns true, if node has an attribute with provided prefix |
static org.w3c.dom.Node |
copyFrom(org.w3c.dom.Document doc,
org.w3c.dom.Node node,
java.lang.String namespaceprefix)
Creates a copy from the given node |
static org.w3c.dom.Element |
createItsNode(org.w3c.dom.Document doc,
org.w3c.dom.Node bookmarkNode,
ItsElementManager manager)
Creates a new itsNode |
static java.util.Map<java.lang.String,java.lang.String> |
extractAttributes(org.w3c.dom.Node node)
Extracts all attributes from a given node and returns it as a map |
static java.lang.String |
extractId(org.w3c.dom.Node node)
Extracts the its id from a given bookmark node |
static void |
fetchNS(org.w3c.dom.Document doc,
java.util.Map<java.lang.String,java.lang.String> map)
Retrieves all namespaces as defined by the root element from given Document Beta function to get all available namespacess from root element. |
static boolean |
hasAttribute(org.w3c.dom.Element e,
java.lang.String attributeName)
Returns true, if element has desired attribute |
static void |
setAttribute(java.lang.String name,
java.lang.String value,
org.w3c.dom.Node... node)
Sets the same attribute for multiple elements |
static void |
setAttributeNS(java.lang.String namespaceURI,
java.lang.String name,
java.lang.String value,
org.w3c.dom.Node... node)
Sets a namespace attribute |
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 void fetchNS(org.w3c.dom.Document doc, java.util.Map<java.lang.String,java.lang.String> map)
doc
- the documentmap
- a map container to store all namespacespublic static java.util.Map<java.lang.String,java.lang.String> extractAttributes(org.w3c.dom.Node node)
node
- the node to retrieve all attributes
public static void setAttribute(java.lang.String name, java.lang.String value, org.w3c.dom.Node... node)
name
- the name of the attributevalue
- the value of the attributenode
- the nodes to set the same attribute forpublic static void setAttributeNS(java.lang.String namespaceURI, java.lang.String name, java.lang.String value, org.w3c.dom.Node... node)
namespaceURI
- name
- value
- node
- public static boolean hasAttribute(org.w3c.dom.Element e, java.lang.String attributeName)
e
- the element to look for specific attributeattributeName
- the attribute name
public static boolean containsAttributeWithPrefix(org.w3c.dom.Node node, java.lang.String prefix)
node
- the node to look for desired attribute prefixprefix
- the attribute prefix
public static java.lang.String extractId(org.w3c.dom.Node node)
node
-
public static org.w3c.dom.Node copyFrom(org.w3c.dom.Document doc, org.w3c.dom.Node node, java.lang.String namespaceprefix)
doc
- node
-
public static org.w3c.dom.Element createItsNode(org.w3c.dom.Document doc, org.w3c.dom.Node bookmarkNode, ItsElementManager manager)
doc
- bookmarkNode
- manager
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |