sdlip.xml.dom
Class DOMUtil
java.lang.Object
|
+--sdlip.xml.dom.DOMUtil
- public class DOMUtil
- extends java.lang.Object
This is a DOM toolkit described in the SDLIP Java tutorial.
Method Summary |
static byte[] |
base64Decode(Element bin)
|
static void |
base64Decode(Element bin,
java.io.OutputStream out)
|
static Element |
base64Encode(Document doc,
byte[] bytes)
|
static Element |
base64Encode(Document doc,
java.io.InputStream in)
|
static Document |
createDocument()
|
static Element |
createTextNode(Document doc,
java.lang.String name,
java.lang.String value)
|
static Element |
getChild(Element elem,
java.lang.String name)
|
static org.w3c.dom.NodeList |
getChildElements(Element elem,
java.lang.String name)
use "*" as name to get all child elements |
static java.lang.String |
getChildText(Element elem,
java.lang.String name)
|
static Element |
getDescendant(Element elem,
java.lang.String name)
|
static java.lang.String |
getDescendantText(Element elem,
java.lang.String name)
|
static java.lang.String |
getText(Element el)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DOMUtil
public DOMUtil()
base64Decode
public static void base64Decode(Element bin,
java.io.OutputStream out)
throws java.io.IOException,
org.w3c.tools.codec.Base64FormatException
base64Decode
public static byte[] base64Decode(Element bin)
throws java.io.IOException,
org.w3c.tools.codec.Base64FormatException
base64Encode
public static Element base64Encode(Document doc,
java.io.InputStream in)
throws java.io.IOException
base64Encode
public static Element base64Encode(Document doc,
byte[] bytes)
throws java.io.IOException
createDocument
public static Document createDocument()
createTextNode
public static Element createTextNode(Document doc,
java.lang.String name,
java.lang.String value)
getChild
public static Element getChild(Element elem,
java.lang.String name)
getChildElements
public static org.w3c.dom.NodeList getChildElements(Element elem,
java.lang.String name)
- use "*" as name to get all child elements
getChildText
public static java.lang.String getChildText(Element elem,
java.lang.String name)
getDescendant
public static Element getDescendant(Element elem,
java.lang.String name)
getDescendantText
public static java.lang.String getDescendantText(Element elem,
java.lang.String name)
getText
public static java.lang.String getText(Element el)