| java.lang.Object org.openlaszlo.xml.internal.XMLUtils
XMLUtils | abstract public class XMLUtils (Code) | | XMLUtils
author: Oliver Steele |
escapeAmpersands | public static String escapeAmpersands(String s)(Code) | | Make sure all the following sequences
< > ' " and &
have their ampersands escaped
Parameters: s - an xml string an escaped xml string |
escapeXml | public static String escapeXml(String s)(Code) | | Escape the 5 entities defined by XML.
These are: '<', '>', '\', '&', '"'.
Parameters: s - an xml string an escaped xml string |
escapeXmlForSWFHTML | public static String escapeXmlForSWFHTML(String s)(Code) | | Escape 3 entities understood by HTML text.
These are: '<', '>', '&'
TODO: [2003-05-05 bloch] move to LZHttpUtils and rename
to escapeHTML
Parameters: s - an xml string an escaped xml string |
getAttributeValue | public static String getAttributeValue(Element e, String aname, String defaultValue)(Code) | | Returns an element's attribute value, as a String. Same as
Element.getAttributeValue, except that it takes a default value
to return if the attribute is missing.
Parameters: e - an Element Parameters: aname - the attribute name Parameters: defaultValue - default value a String |
getNoDeclarationXML | public static String getNoDeclarationXML(StringBuffer xml)(Code) | | Returns xml from first non-declaration element.
Parameters: xml - xml string buffer. xml string with no declarations. |
getXPathTo | public static String getXPathTo(Element elt)(Code) | | Returns an xpath for the element
Parameters: elt - the element the xpath |
requireAttributeValue | public static String requireAttributeValue(Element e, String aname)(Code) | | Returns an element's attribute value, as a String. Same as
Element.getAttributeValue, except guarantees not to return
void.
Parameters: e - an Element Parameters: aname - the attribute name a String |
toString | public static String toString(Element element)(Code) | | |
|
|