|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.xml.security.utils.XMLUtils
public class XMLUtils
DOM and XML accessibility and comfort functions.
| Method Summary | |
|---|---|
static void |
addReturnToElement(Element e)
Method addReturnToElement |
static void |
circumventBug2650(Document doc)
This method spreads all namespace attributes in a DOM document to their children. |
static Set |
convertNodelistToSet(NodeList xpathNodeSet)
Method convertNodelistToSet |
static Element |
createDSctx(Document doc,
String prefix,
String namespace)
Method createDSctx |
static Element |
createElementInSignatureSpace(Document doc,
String elementName)
Creates an Element in the XML Signature specification namespace. |
static boolean |
elementIsInEncryptionSpace(Element element,
String localName)
Returns true if the element is in XML Encryption namespace and the local name equals the supplied one. |
static boolean |
elementIsInSignatureSpace(Element element,
String localName)
Returns true if the element is in XML Signature namespace and the local name equals the supplied one. |
static Set |
excludeNodeFromSet(Node signatureElement,
Set inputSet)
|
static String |
getFullTextChildrenFromElement(Element element)
Method getFullTextChildrenFromElement |
static Element |
getNextElement(Node el)
|
static Document |
getOwnerDocument(Node node)
This method returns the owner document of a particular node. |
static Document |
getOwnerDocument(Set xpathNodeSet)
This method returns the first non-null owner document of the Node's in this Set. |
static void |
getSet(Node rootNode,
Set result,
Node exclude,
boolean com)
|
static boolean |
isDescendantOrSelf(Node ctx,
Node descendantOrSelf)
Returns true if the descendantOrSelf is on the descendant-or-self axis of the context node. |
static void |
outputDOM(Node contextNode,
OutputStream os)
Outputs a DOM tree to an OutputStream. |
static void |
outputDOM(Node contextNode,
OutputStream os,
boolean addPreamble)
Outputs a DOM tree to an OutputStream. |
static void |
outputDOMc14nWithComments(Node contextNode,
OutputStream os)
Serializes the contextNode into the OutputStream, but
supresses all Exceptions. |
static Element |
selectDsNode(Node sibling,
String nodeName,
int number)
|
static Element[] |
selectDsNodes(Node sibling,
String nodeName)
|
static Text |
selectDsNodeText(Node sibling,
String nodeName,
int number)
|
static Element |
selectNode(Node sibling,
String uri,
String nodeName,
int number)
|
static Element[] |
selectNodes(Node sibling,
String uri,
String nodeName)
|
static Text |
selectNodeText(Node sibling,
String uri,
String nodeName,
int number)
|
static Element |
selectXencNode(Node sibling,
String nodeName,
int number)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Element getNextElement(Node el)
public static void getSet(Node rootNode,
Set result,
Node exclude,
boolean com)
rootNode - result - exclude - com - wheather comments or not
public static void outputDOM(Node contextNode,
OutputStream os)
OutputStream.
contextNode - root node of the DOM treeos - the OutputStream
public static void outputDOM(Node contextNode,
OutputStream os,
boolean addPreamble)
OutputStream. If an Exception is
thrown during execution, it's StackTrace is output to System.out, but the
Exception is not re-thrown.
contextNode - root node of the DOM treeos - the OutputStreamaddPreamble -
public static void outputDOMc14nWithComments(Node contextNode,
OutputStream os)
contextNode into the OutputStream, but
supresses all Exceptions.
try{} statement, but handle the Exceptions appropriately.
contextNode - os - public static String getFullTextChildrenFromElement(Element element)
element -
public static Element createElementInSignatureSpace(Document doc,
String elementName)
doc - the factory DocumentelementName - the local name of the Element
public static boolean elementIsInSignatureSpace(Element element,
String localName)
element - localName -
public static boolean elementIsInEncryptionSpace(Element element,
String localName)
element - localName -
public static Document getOwnerDocument(Node node)
Document. Node.getOwnerDocument() returns null
if the Node is a Document.
node -
public static Document getOwnerDocument(Set xpathNodeSet)
Document. Node.getOwnerDocument() returns null
if the Node is a Document.
xpathNodeSet -
public static Element createDSctx(Document doc,
String prefix,
String namespace)
doc - prefix - namespace -
public static void addReturnToElement(Element e)
e - public static Set convertNodelistToSet(NodeList xpathNodeSet)
xpathNodeSet -
public static void circumventBug2650(Document doc)
doc -
public static Element selectDsNode(Node sibling,
String nodeName,
int number)
sibling - nodeName - number -
public static Element selectXencNode(Node sibling,
String nodeName,
int number)
sibling - nodeName - number -
public static Text selectDsNodeText(Node sibling,
String nodeName,
int number)
sibling - nodeName - number -
public static Text selectNodeText(Node sibling,
String uri,
String nodeName,
int number)
sibling - uri - nodeName - number -
public static Element selectNode(Node sibling,
String uri,
String nodeName,
int number)
sibling - uri - nodeName - number -
public static Element[] selectDsNodes(Node sibling,
String nodeName)
sibling - nodeName -
public static Element[] selectNodes(Node sibling,
String uri,
String nodeName)
sibling - uri - nodeName -
public static Set excludeNodeFromSet(Node signatureElement,
Set inputSet)
signatureElement - inputSet -
public static boolean isDescendantOrSelf(Node ctx,
Node descendantOrSelf)
ctx - descendantOrSelf -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||