Class f_xml
Object
f_xml
public class f_xml
- extends Object
XML utils
GetFirstChildElement
public static Node GetFirstChildElement(Node element,
String tagName)
- Parameters:
element - XML node.tagName - Name of the tag.
- Returns:
- XML node or null.
Serialize
public static String Serialize(Node node)
- Parameters:
node - XML node.
- Returns:
- XML output.
FromString
public static Document FromString(String data)
- Parameters:
data - XML content.
- Returns:
- XML Document.
GetValue
public static String GetValue(Node element,
String defaultValue)
- Parameters:
element - XML node.defaultValue - Default value.
- Returns:
- Value associated to the XML node.
Object
public static Document Object()
- Create an empty XML Document.
- Returns:
- Empty XML DOM document.
GetChildElements
public static Node[] GetChildElements(Node element,
String tagName,
String attrName,
String attrValue)
- Parameters:
element - XML node.tagName - Name of the tag or null.attrName - Name of an attribute.attrValue - A value for the specified attribute.
- Returns:
- An array of xml nodes.