Package com.google.gwt.xml.client
Class XMLParser
- java.lang.Object
-
- com.google.gwt.xml.client.XMLParser
-
public class XMLParser extends java.lang.ObjectThis class represents the client interface to XML parsing.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DocumentcreateDocument()This method creates a new document, to be manipulated by the DOM API.static Documentparse(java.lang.String contents)This method parses a new document from the supplied string, throwing aDOMParseExceptionif the parse fails.static voidremoveWhitespace(Node n)This method removes allTextnodes which are made up of only white space.static booleansupportsCDATASection()Deprecated.Always returns true
-
-
-
Method Detail
-
createDocument
public static Document createDocument()
This method creates a new document, to be manipulated by the DOM API.- Returns:
- the newly created document
-
parse
public static Document parse(java.lang.String contents)
This method parses a new document from the supplied string, throwing aDOMParseExceptionif the parse fails.- Parameters:
contents- the String to be parsed into aDocument- Returns:
- the newly created
Document
-
removeWhitespace
public static void removeWhitespace(Node n)
This method removes allTextnodes which are made up of only white space.- Parameters:
n- the node which is to have all of its whitespace descendents removed.
-
supportsCDATASection
@Deprecated public static boolean supportsCDATASection()
Deprecated.Always returns trueThis method determines whether the browser supportsCDATASectionas distinct entities fromTextnodes.- Returns:
- true if the browser supports
CDATASection, otherwisefalse.
-
-