| java.lang.Object de.gulden.util.xml.XMLToolbox
XMLToolbox | public class XMLToolbox (Code) | | Class XMLToolbox.
author: Jens Gulden version: snapshot-beautyj-1.1 |
Method Summary | |
public static DocumentBuilder | createDefaultDocumentBuilder() Creates the default document builder. | public static DocumentBuilder | createDefaultDocumentBuilder(boolean validating, boolean namespaceAware, boolean ignoringElementContentWhitespace, boolean ignoringComments, boolean expandEntityReferences, boolean coalescing) Creates the default document builder. | public static String | formatXML(Node xml, boolean indenting, boolean preserveSpace) | public static String | getAttribute(Element e, String name, String deflt)
Returns an attribute's value. | public static String | getAttribute(Element e, String name)
Returns an attribute's value. | public static String | getAttributeRequired(Element e, String att) Returns the attribute required. | public static boolean | getBooleanAttribute(Element e, String attr, boolean deflt) Returns the boolean attribute. | public static Element | getChild(Element e, String tagname) Returns the first child with the specified tagname. | public static Element | getChild(Element e, String tagname, String attributeName, String attributeValue) Returns the first child with the specified tagname and the named attribute set to the given value. | public static Element | getChildRequired(Element e, String tagname) Returns the child required. | public static String | getChildText(Element e, String tagname) Returns the child text. | public static NodeListCollection | getChildren(Element e, String tagname) Returns the children. | public static NodeListCollection | getChildren(Element e) Returns the children. | public static NodeListCollection | getChildren(Element e, String[] tagnames) Returns the children. | public static Element | getFirstChild(Element e) Returns the first child. | public static Element | getFollowingElement(Node n) Returns the following element. | public static String | getLangstring(Element element, String countryCode) Returns the langstring. | public static String | getLangstring(Element element) Returns the langstring. | public static Element | getNextSibling(Node n) Returns the next sibling. | public static Element | getSelfOrFollowingElement(Node n) Returns the self or following element. | public static String | getText(Element e) Returns the text. | public static boolean | isYesAttribute(Element e, String attr) | public static Element | parseXML(String s) Parses the x m l. | public static void | requireTagName(Element element, String name) | public static String | translateJavaNameToXMLName(String name) | public static String | translateXMLNameToJavaName(String name) | public static String | xmlEscape(String s) | public static String | xmlEscapeAll(String s) |
parseXMLDocumentBuilder | protected static DocumentBuilder parseXMLDocumentBuilder(Code) | | The parse x m l document builder.
|
createDefaultDocumentBuilder | public static DocumentBuilder createDefaultDocumentBuilder()(Code) | | Creates the default document builder.
|
createDefaultDocumentBuilder | public static DocumentBuilder createDefaultDocumentBuilder(boolean validating, boolean namespaceAware, boolean ignoringElementContentWhitespace, boolean ignoringComments, boolean expandEntityReferences, boolean coalescing)(Code) | | Creates the default document builder.
|
formatXML | public static String formatXML(Node xml, boolean indenting, boolean preserveSpace)(Code) | | |
getAttribute | public static String getAttribute(Element e, String name)(Code) | |
Returns an attribute's value. Note that unlike
org.w3c.dom.Element.getAttribute(name), this method returns null
if the attribute does not exist on the element. The empty string is only
returned if the attribute actually contains the empty string as value.
Parameters: e - The element which carries an attribute. Parameters: name - The name of the attribute.
a String with the attribtue's value, null if theattribute is absent on the element. |
getBooleanAttribute | public static boolean getBooleanAttribute(Element e, String attr, boolean deflt)(Code) | | Returns the boolean attribute.
|
getChild | public static Element getChild(Element e, String tagname, String attributeName, String attributeValue)(Code) | | Returns the first child with the specified tagname and the named attribute set to the given value.
|
getFollowingElement | public static Element getFollowingElement(Node n)(Code) | | Returns the following element.
|
getNextSibling | public static Element getNextSibling(Node n)(Code) | | Returns the next sibling.
|
getSelfOrFollowingElement | public static Element getSelfOrFollowingElement(Node n)(Code) | | Returns the self or following element.
|
translateJavaNameToXMLName | public static String translateJavaNameToXMLName(String name)(Code) | | |
translateXMLNameToJavaName | public static String translateXMLNameToJavaName(String name)(Code) | | |
|
|