|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.xml.XmlUtil
public abstract class XmlUtil
A collection of utilities for xml.
| Field Summary | |
|---|---|
static String |
NULL_STRING
Just so we don't have to do (String) null. |
static String |
TAG_WILDCARD
used for matching any tag |
static String |
XML_HEADER
The header to use when writing out xml |
| Constructor Summary | |
|---|---|
XmlUtil()
Dummy ctor for doclint. |
|
| Method Summary | |
|---|---|
static void |
addChildren(Element element,
List children)
Append the given list of children Elements to the given Element. |
static void |
appendCdata(StringBuffer sb,
String s)
_more_ |
static void |
appendCdataBytes(StringBuffer sb,
byte[] bytes)
_more_ |
static void |
attr(Appendable buff,
String name,
String value,
String tab)
Append onto the given StringBuffer name="value" string encode the value. |
static String |
attr(String name,
String value)
Return a String with name="value". |
static String |
attrs(String[] attrs)
_more_ |
static String |
attrs(String name,
String value)
_more_ |
static String |
attrs(String n1,
String v1,
String n2,
String v2)
Return a String with n1="v1" n2="v2". |
static String |
attrs(String n1,
String v1,
String n2,
String v2,
String n3,
String v3)
Return a String with n1="v1" n2="v2". |
static String |
attrs(String n1,
String v1,
String n2,
String v2,
String n3,
String v3,
String n4,
String v4)
Return a String with n1="v1" n2="v2". |
static String |
calculateRFC2104HMAC(String data,
String key)
Computes RFC 2104-compliant HMAC signature. |
static String |
closeTag(String name)
Make a close tag |
static String |
comment(String value)
Create and return an xml comment. |
static Element |
create(Document doc,
String tag)
_more_ |
static Element |
create(Document doc,
String tag,
Element parent)
_more_ |
static Element |
create(Document doc,
String tag,
Element parent,
List attrs)
_more_ |
static Element |
create(Document doc,
String tag,
Element parent,
String text)
_more_ |
static Element |
create(Document doc,
String tag,
Element parent,
String[] attrs)
_more_ |
static Element |
create(Document doc,
String tag,
Element parent,
String text,
String[] attrs)
_more_ |
static Element |
create(Document doc,
String tag,
String[] attrs)
_more_ |
static Element |
create(String tag,
Element parent)
_more_ |
static Element |
create(String tag,
Element parent,
List attrs)
_more_ |
static Element |
create(String tag,
Element parent,
String text)
_more_ |
static Element |
create(String tag,
Element parent,
String[] attrs)
_more_ |
static Element |
create(String tag,
Element parent,
String text,
String[] attrs)
_more_ |
static void |
createCDataNode(Element parent,
String text)
_more_ |
static byte[] |
decodeBase64(String s)
Decode the given base64 String |
static String |
encodeBase64(byte[] b)
Return the base64 encoded representation of the given byte array |
static String |
encodeString(String v)
Do a simple conversion of special characters to their encoding. |
static void |
ensureAttributes(Node element,
String[] attrs)
Make sure that the given element contains the given attributes. |
static Element |
findAncestor(Element child,
String tagName)
Find the ancestor of the given node with the given tagname |
static Element |
findChild(Node parent,
String tag)
Find the first child element of the given parent Node whose tag name.equals the given tag. |
static Element |
findChildRecurseUp(Node parent,
String tag)
Find the first child element of the given parent Node whose tag name.equals the given tag. |
static List |
findChildren(Node parent,
String tag)
Find all of the children elements of the given parent Node whose tag name.equals the given tag. |
static List |
findChildrenRecurseUp(Node parent,
String tag)
Find all of the children elements of the given parent Node and all of its ancestors whose tag name.equals the given tag. |
static Element |
findDescendant(Node parent,
String tag)
Find the first descendant element of the given parent Node whose tag name.equals the given tag. |
static Element |
findDescendantFromPath(Element parent,
String path)
This method searches, starting at the given parent, for a descendant path. |
static List |
findDescendants(Node parent,
String tag)
Find all of the descendant elements of the given parent Node whose tag name.equals the given tag. |
static List |
findDescendantsFromPath(Element parent,
String path)
Like findDescendantFromPath, this method finds all descendants. |
static Element |
findElement(Element root,
String tag,
String attributeName,
String attributeValue)
Find the Element under (recursively) the given root Element with the given tag name (if non-null) that contains an attribute of the given name and value. |
static Element |
findElement(NodeList elements,
String attributeName,
String attributeValue)
Find the first Element in the given NodeList of Elements that has the given attribute with value .equals the given attributeValue. |
static Element |
findRoot(Element child)
Find the root element of the given node. |
static Element |
findUrlRefNode(Element node)
This method will return either the given node argument if it does not contain an attribute of name "url". |
static Element |
findUrlRefNode(Element node,
String urlAttr)
This method will return either the given node argument if it does not contain an attribute of the given urlAttr. |
static String |
getAttribute(NamedNodeMap attrs,
String name)
Get the given name-d attribute from the given attrs map. |
static boolean |
getAttribute(NamedNodeMap attrs,
String name,
boolean dflt)
Get the given name-d attribute from the given attrs map. |
static Color |
getAttribute(NamedNodeMap attrs,
String name,
Color dflt)
Get the given name-d attribute from the given attrs map. |
static double |
getAttribute(NamedNodeMap attrs,
String name,
double dflt)
Get the given name-d attribute from the given attrs map. |
static float |
getAttribute(NamedNodeMap attrs,
String name,
float dflt)
Get the given name-d attribute from the given attrs map. |
static int |
getAttribute(NamedNodeMap attrs,
String name,
int dflt)
Get the given name-d attribute from the given attrs map. |
static String |
getAttribute(NamedNodeMap attrs,
String name,
String dflt)
Get the given name-d attribute from the given attrs map. |
static String |
getAttribute(Node element,
String name)
Get the given name attribute from the given element. |
static boolean |
getAttribute(Node element,
String name,
boolean dflt)
Get the given name-d attribute from the given element. |
static Color |
getAttribute(Node element,
String name,
Color dflt)
Get the given name-d attribute from the given element. |
static double |
getAttribute(Node element,
String name,
double dflt)
Get the given name-d attribute from the given element. |
static float |
getAttribute(Node element,
String name,
float dflt)
Get the given name-d attribute from the given element. |
static int |
getAttribute(Node element,
String name,
int dflt)
Get the given name-d attribute from the given element. |
static String |
getAttribute(Node element,
String name,
String dflt)
Get the given name-d attribute from the given element. |
static String |
getAttributeFromTree(Node element,
String name)
Get the given named attribute from the given element. |
static boolean |
getAttributeFromTree(Node element,
String name,
boolean dflt)
_more_ |
static int |
getAttributeFromTree(Node element,
String name,
int dflt)
Get the given named attribute from the given element. |
static String |
getAttributeFromTree(Node element,
String name,
String dflt)
Get the given named attribute from the given element. |
static List |
getAttributesFromTree(Node element,
String name,
Hashtable tags)
Get a list of attributes of the given name from the given element and all of its parent elements. |
static List |
getAttributesFromTree(Node element,
String name,
Hashtable tags,
List listOfValues)
Get a list of attributes of the given name from the given element and all of its parent elements. |
static String |
getCdata(String s)
_more_ |
static String |
getChildText(Node parent)
Concatenates the node values (grom getNodeValue) of the children of the given parent Node. |
static Document |
getDocument(InputStream stream)
Create a Document object with the given xml. |
static Document |
getDocument(String xml)
Create a Document object with the given xml. |
static Document |
getDocument(String filename,
Class originClass)
Read in the xml contained in the given filename, parse it and return the root Element. |
static Element |
getElement(Element parent,
String tagName)
Get the first Element children of the given parent Element with the given tagName. |
static NodeList |
getElements(Element parent)
Get all children of the given parent Element who are instances of the Element class. |
static XmlNodeList |
getElements(Element parent,
String tagName)
Get all Element children of the given parent Element with the given tagName. |
static NodeList |
getElements(Element parent,
XmlNodeList nodeList)
Get all children of the given parent Element who are instances of the Element class. |
static Element |
getFirstChild(Element parent)
Get the first Element child of the given parent Element. |
static NodeList |
getGrandChildren(Element parent)
Get all grand children of the given parent Element who are instances of the Element class. |
static String |
getGrandChildText(Node parent,
String childTag)
Finds the child node with the given tag name. |
static String |
getGrandChildText(Node parent,
String childTag,
String dflt)
Finds the child node with the given tag name. |
static double |
getGrandChildValue(Node parent,
String childTag,
double dflt)
_more_ |
static String |
getHeader()
Return the default xml header. |
static List |
getListOfElements(Element parent)
Create and return a List of the Element children of the given parent node. |
static String |
getLocalName(Node element)
Get the non qualified tag name |
static String |
getNodeName(Node node)
Get the non qualified tag name |
static Element |
getRoot(InputStream stream)
Read in the xml contained in the given filename, parse it and return the root Element. |
static Element |
getRoot(String xml)
Parse the given xml and return the root Element. |
static Element |
getRoot(String filename,
Class originClass)
Read in the xml contained in the given filename, parse it and return the root Element. |
static boolean |
hasAttribute(Node element,
String attributeName)
Does the given node have the attribute |
static boolean |
isFullyQualified(String tagName)
_more_ |
static boolean |
isTag(Node node,
String name)
Checks if the tag name of the given node matches the given name. |
static void |
main(String[] args)
A main for tests |
static CDATASection |
makeCDataNode(Document doc,
String text)
_more_ |
static CDATASection |
makeCDataNode(Document doc,
String text,
boolean andEncode)
_more_ |
static Document |
makeDocument()
A utility to make an empty document |
static void |
mergeAttributes(Element n1,
Element n2)
Copy the attributes from n2 to n1. |
static String |
openTag(String name)
Make an open tag |
static String |
openTag(String name,
String attrs)
Return a String of the form: <name attrs /> |
static String |
quote(String value)
Wrap the given string value in quotes. |
static void |
removeChildren(Element parent)
Remove all children from the given parent Element. |
static void |
setAttribute(Element node,
String name,
Color value)
A utility to set the attribute on the given node as the String representation of the given color |
static void |
setAttributes(Element node,
String[] attrs)
The attrs parameter is an array of [name1, value1, name2, value2, etc]. |
static String |
tag(String name,
String attrs)
Return a String of the form: <name attrs /> |
static String |
tag(String name,
String attrs,
String contents)
Return a String of the form: <name attrs > contents </name> |
static void |
toHtml(StringBuffer html,
Node node)
_more_ |
static String |
toString(Node node)
Convert the DOM rooted at the given Node to an xml String representation. |
static void |
toString(Node node,
Appendable appendable)
_more_ |
static String |
toString(Node node,
boolean prettyPrint)
Convert the DOM rooted at the given Node to an xml String representation. |
static String |
toString(Node node,
String tabSpacing,
String newLine)
Convert the DOM rooted at the given Node to an xml representation. |
static String |
toString(Node node,
String tabSpacing,
String newLine,
boolean recurse)
Convert the DOM rooted at the given Node to an xml representation. |
static String |
toStringNoChildren(Node node)
Convert the DOM rooted at the given Node to an xml String representation. |
static String |
toStringWithHeader(Node node)
Convert the DOM rooted at the given Node to an xml String representation. |
static String |
toStringWithHeader(Node node,
String tabSpacing,
String newLine)
Convert the DOM rooted at the given Node to an xml representation. |
static String |
toStringWithHeader(Node node,
String tabSpacing,
String newLine,
boolean prettifyAttrs)
Convert the xml to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XML_HEADER
public static final String TAG_WILDCARD
public static final String NULL_STRING
| Constructor Detail |
|---|
public XmlUtil()
| Method Detail |
|---|
public static String quote(String value)
value - the String to wrap in quotes.
public static String encodeBase64(byte[] b)
b - The bytes to encode
public static byte[] decodeBase64(String s)
s - Holds the base64 encoded bytes
public static String comment(String value)
value - The String to comment.
public static void attr(Appendable buff,
String name,
String value,
String tab)
buff - The string buffer to append onto.name - The attribute name.value - The attribute value.tab - The tab to prepend onto the result.
public static String attr(String name,
String value)
name - The attribute name.value - The attribute value.
public static String attrs(String[] attrs)
attrs - _more_
public static String attrs(String name,
String value)
name - _more_value - _more_
public static String attrs(String n1,
String v1,
String n2,
String v2)
n1 - The first attribute name.v1 - The first attribute value.n2 - The second attribute name.v2 - The second attribute value.
public static String attrs(String n1,
String v1,
String n2,
String v2,
String n3,
String v3)
n1 - The first attribute name.v1 - The first attribute value.n2 - The second attribute name.v2 - The second attribute value.n3 - The third attribute name.v3 - The third attribute value.
public static String attrs(String n1,
String v1,
String n2,
String v2,
String n3,
String v3,
String n4,
String v4)
n1 - The first attribute name.v1 - The first attribute value.n2 - The second attribute name.v2 - The second attribute value.n3 - The third attribute name.v3 - The third attribute value.n4 - The fourth attribute name.v4 - The fourth attribute value.
public static String tag(String name,
String attrs,
String contents)
name - The tag name.attrs - The attribute section of the tag.contents - The body of the tag
public static String tag(String name,
String attrs)
name - The tag name.attrs - The attribute section of the tag.
public static String openTag(String name,
String attrs)
name - The tag name.attrs - The attribute section of the tag.
public static String openTag(String name)
name - tag name
public static String closeTag(String name)
name - tag name
public static String getAttributeFromTree(Node element,
String name)
element - The xml node to look within.name - The attribute name
public static String getAttributeFromTree(Node element,
String name,
String dflt)
element - The xml node to look within.name - The attribute name.dflt - The default value returned.
public static int getAttributeFromTree(Node element,
String name,
int dflt)
element - The xml node to look within.name - The attribute name.dflt - The default value returned.
public static boolean getAttributeFromTree(Node element,
String name,
boolean dflt)
element - _more_name - _more_dflt - _more_
public static List getAttributesFromTree(Node element,
String name,
Hashtable tags)
element - The xml node to look within.name - The attribute name.tags - If non-null then only look at elements whose tag name is held by the tags hashtable.
If the element we are looking at is not within the table then stop searching upwards.
public static List getAttributesFromTree(Node element,
String name,
Hashtable tags,
List listOfValues)
element - The xml node to look within.name - The attribute name.tags - If non-null then only look at elements whose tag name is held by the tags hashtable.
If the element we are looking at is not within the table then stop searching upwards.listOfValues - The list ot put the values in.
public static boolean hasAttribute(Node element,
String attributeName)
element - nodeattributeName - attribute
public static String getAttribute(Node element,
String name)
element - The xml element to look within.name - The attribute name.
public static void ensureAttributes(Node element,
String[] attrs)
element - The xml element to look within.attrs - Array of attribute names.
public static String getAttribute(Node element,
String name,
String dflt)
element - The xml element to look within.name - The attribute name.dflt - The default value.
public static boolean getAttribute(Node element,
String name,
boolean dflt)
element - The xml element to look within.name - The attribute name.dflt - The default value.
public static int getAttribute(Node element,
String name,
int dflt)
element - The xml element to look within.name - The attribute name.dflt - The default value.
public static float getAttribute(Node element,
String name,
float dflt)
element - The xml element to look within.name - The attribute name.dflt - The default value.
public static double getAttribute(Node element,
String name,
double dflt)
element - The xml element to look within.name - The attribute name.dflt - The default value.
public static Color getAttribute(Node element,
String name,
Color dflt)
element - The xml element to look within.name - The attribute name.dflt - The default value.
public static String getAttribute(NamedNodeMap attrs,
String name)
attrs - The xml attribute map.name - The name of the attribute.
public static String getAttribute(NamedNodeMap attrs,
String name,
String dflt)
attrs - The xml attribute map.name - The name of the attribute.dflt - The default value
public static int getAttribute(NamedNodeMap attrs,
String name,
int dflt)
attrs - The xml attribute map.name - The name of the attribute.dflt - The default value
public static float getAttribute(NamedNodeMap attrs,
String name,
float dflt)
attrs - The xml attribute map.name - The name of the attribute.dflt - The default value
public static double getAttribute(NamedNodeMap attrs,
String name,
double dflt)
attrs - The xml attribute map.name - The name of the attribute.dflt - The default value
public static boolean getAttribute(NamedNodeMap attrs,
String name,
boolean dflt)
attrs - The xml attribute map.name - The name of the attribute.dflt - The default value
public static Color getAttribute(NamedNodeMap attrs,
String name,
Color dflt)
GuiUtils.decodeColor(java.lang.String, java.awt.Color)).
If not found then return the dflt argument.
attrs - The xml attribute map.name - The name of the attribute.dflt - The default value
public static void setAttribute(Element node,
String name,
Color value)
node - The nodename - The attr namevalue - The color
public static void mergeAttributes(Element n1,
Element n2)
n1 - The source of the attributes.n2 - What to copy into.
public static void setAttributes(Element node,
String[] attrs)
node - The xml element to set attributes on.attrs - The array of attribute name/value pairs.
public static Element findChild(Node parent,
String tag)
parent - The xml node to search for children.tag - The tag name of the child xml element.
public static List findChildrenRecurseUp(Node parent,
String tag)
parent - The xml node to search for children.tag - The tag name of the child xml element.
public static Element findChildRecurseUp(Node parent,
String tag)
parent - The xml node to search for children.tag - The tag name of the child xml element.
public static List findChildren(Node parent,
String tag)
parent - The xml node to search for children.tag - The tag name of the child xml element.
public static void addChildren(Element element,
List children)
element - The parent element.children - The list of children.
public static Element findDescendant(Node parent,
String tag)
parent - The root of the xml dom tree to search.tag - The tag name to match.
public static List findDescendants(Node parent,
String tag)
parent - The root of the xml dom tree to search.tag - The tag name to match.
public static Element findDescendantFromPath(Element parent,
String path)
So, given:
path=Alabama.Alaska.Arkansasthis method will try to find the Arkansas tag which is a child of Alaska, which is a child of Alabama, which is a child of the given parent parameter.
parent - The root of the xml dom tree to search.path - The "." delimited string of tag names.
public static List findDescendantsFromPath(Element parent,
String path)
parent - The root of the xml dom tree to search.path - The "." delimited string of tag names.
public static Element getRoot(String xml)
throws Exception
xml - The xml.
Exception - When something goes wrong.
public static Element create(String tag,
Element parent)
throws Exception
tag - _more_parent - _more_
Exception - _more_
public static Element create(String tag,
Element parent,
List attrs)
throws Exception
tag - _more_parent - _more_attrs - _more_
Exception - _more_
public static Element create(Document doc,
String tag)
throws Exception
doc - _more_tag - _more_
Exception - _more_
public static Element create(Document doc,
String tag,
Element parent)
throws Exception
doc - _more_tag - _more_parent - _more_
Exception - _more_
public static Element create(Document doc,
String tag,
Element parent,
List attrs)
throws Exception
doc - _more_tag - _more_parent - _more_attrs - _more_
Exception - _more_
public static Element create(Document doc,
String tag,
String[] attrs)
throws Exception
doc - _more_tag - _more_attrs - _more_
Exception - _more_
public static Element create(Document doc,
String tag,
Element parent,
String[] attrs)
throws Exception
doc - _more_tag - _more_parent - _more_attrs - _more_
Exception - _more_
public static Element create(Document doc,
String tag,
Element parent,
String text,
String[] attrs)
throws Exception
doc - _more_tag - _more_parent - _more_text - _more_attrs - _more_
Exception - _more_
public static Element create(Document doc,
String tag,
Element parent,
String text)
throws Exception
doc - _more_tag - _more_parent - _more_text - _more_
Exception - _more_
public static Element create(String tag,
Element parent,
String[] attrs)
throws Exception
tag - _more_parent - _more_attrs - _more_
Exception - _more_
public static Element create(String tag,
Element parent,
String text,
String[] attrs)
throws Exception
tag - _more_parent - _more_text - _more_attrs - _more_
Exception - _more_
public static Element create(String tag,
Element parent,
String text)
throws Exception
tag - _more_parent - _more_text - _more_
Exception - _more_
public static Element getRoot(String filename,
Class originClass)
throws Exception
filename - The filename, url or resource path of the xml document.originClass - Where to look for resources.
Exception - When something goes wrong.
public static Element getRoot(InputStream stream)
throws Exception
stream - _more_
Exception - When something goes wrong.
public static Document getDocument(String filename,
Class originClass)
throws Exception
filename - The filename, url or resource path of the xml document.originClass - Where to look for resources.
Exception - When something goes wrong.public static Element findRoot(Element child)
child - The xml element to serach for the root of.
public static boolean isTag(Node node,
String name)
node - the xml nodename - name
public static String getLocalName(Node element)
element - element
public static boolean isFullyQualified(String tagName)
tagName - _more_
public static String getNodeName(Node node)
node - node
public static Element findAncestor(Element child,
String tagName)
child - The xml element to serach for the root of.tagName - The tag name to look for
public static Document makeDocument()
public static Document getDocument(String xml)
throws Exception
xml - The xml.
Exception - When something goes wrong.
public static Document getDocument(InputStream stream)
throws Exception
stream - stream
Exception - When something goes wrong.public static Element getFirstChild(Element parent)
parent - The xml node to search its chidlren.
public static NodeList getElements(Element parent)
parent - The xml node to search its chidlren.
public static NodeList getElements(Element parent,
XmlNodeList nodeList)
parent - The xml node to search its chidlren.nodeList - list to add to
public static NodeList getGrandChildren(Element parent)
parent - The xml node to search its chidlren.
public static String getGrandChildText(Node parent,
String childTag,
String dflt)
parent - The xml node to search its chidlren.childTag - _more_dflt - _more_
public static double getGrandChildValue(Node parent,
String childTag,
double dflt)
parent - _more_childTag - _more_dflt - _more_
public static String getGrandChildText(Node parent,
String childTag)
parent - The xml node to search its chidlren.childTag - _more_
public static void appendCdataBytes(StringBuffer sb,
byte[] bytes)
sb - _more_bytes - _more_
public static void appendCdata(StringBuffer sb,
String s)
sb - _more_s - _more_public static String getCdata(String s)
s - _more_
public static CDATASection makeCDataNode(Document doc,
String text)
doc - _more_text - _more_
public static void createCDataNode(Element parent,
String text)
parent - _more_text - _more_
public static CDATASection makeCDataNode(Document doc,
String text,
boolean andEncode)
doc - _more_text - _more_andEncode - _more_
public static String getChildText(Node parent)
parent - The xml node to search its chidlren.
public static XmlNodeList getElements(Element parent,
String tagName)
parent - The xml node to search its children.tagName - The tag to match.
public static Element getElement(Element parent,
String tagName)
parent - The xml node to search its children.tagName - The tag to match.
public static List getListOfElements(Element parent)
parent - The xml node to find its children.
public static String getHeader()
public static String toString(Node node)
node - The xml node to convert its tree.
public static String toStringNoChildren(Node node)
node - The xml node to convert its tree.
public static String toStringWithHeader(Node node)
node - The xml node to convert its tree.
public static String toString(Node node,
boolean prettyPrint)
node - The xml node to convert its tree.prettyPrint - Should the string be formatted with
tabs and new lines
public static String toString(Node node,
String tabSpacing,
String newLine)
node - The xml tree root.tabSpacing - The spacing to put into the result string before each tag.newLine - The new line to output after each tag.
public static String toString(Node node,
String tabSpacing,
String newLine,
boolean recurse)
node - The xml tree root.tabSpacing - The spacing to put into the result string before each tag.newLine - The new line to output after each tag.recurse - _more_
public static String toStringWithHeader(Node node,
String tabSpacing,
String newLine)
node - The xml tree root.tabSpacing - The spacing to put into the result string before each tag.newLine - The new line to output after each tag.
public static void toString(Node node,
Appendable appendable)
node - _more_appendable - _more_
public static String toStringWithHeader(Node node,
String tabSpacing,
String newLine,
boolean prettifyAttrs)
node - xml roottabSpacing - tabnewLine - new lineprettifyAttrs - If true then layout attributes
public static void toHtml(StringBuffer html,
Node node)
html - _more_node - _more_public static String encodeString(String v)
v - The source string.
public static Element findElement(NodeList elements,
String attributeName,
String attributeValue)
elements - The Elements to search.attributeName - The attribute name to look for.attributeValue - The value to match.
public static Element findElement(Element root,
String tag,
String attributeName,
String attributeValue)
root - The Element to seatrch under.tag - The tag name of the descendant Element to match.attributeName - The attribute name to look for.attributeValue - The value to match.
public static void removeChildren(Element parent)
parent - The xml element to remove children from.
public static Element findUrlRefNode(Element node,
String urlAttr)
node - The node to look at.urlAttr - The attribute name that holds the url.
public static Element findUrlRefNode(Element node)
node - The node to look at.
public static void main(String[] args)
throws Exception
args - Command line arguments
Exception - _more_
public static String calculateRFC2104HMAC(String data,
String key)
throws SignatureException
data - The data to be signed.key - The signing key.
SignatureException - when signature generation fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||