Package org.petitparser.grammar.xml
Class XmlBuilder
java.lang.Object
org.petitparser.grammar.xml.XmlBuilder
- All Implemented Interfaces:
XmlCallback<XmlName,XmlNode,XmlAttribute>
public class XmlBuilder extends Object implements XmlCallback<XmlName,XmlNode,XmlAttribute>
Builds the XML AST.
-
Constructor Summary
Constructors Constructor Description XmlBuilder() -
Method Summary
Modifier and Type Method Description XmlNodecreateAttribute(XmlName name, String text)XmlNodecreateCDATA(String text)XmlNodecreateComment(String text)XmlNodecreateDoctype(String text)XmlNodecreateDocument(Collection<XmlNode> children)XmlNodecreateElement(XmlName name, Collection<XmlAttribute> attributes, Collection<XmlNode> children)XmlNodecreateProcessing(String target, String text)XmlNamecreateQualified(String name)XmlNodecreateText(String text)
-
Constructor Details
-
XmlBuilder
public XmlBuilder()
-
-
Method Details
-
createAttribute
- Specified by:
createAttributein interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createComment
- Specified by:
createCommentin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createCDATA
- Specified by:
createCDATAin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createDoctype
- Specified by:
createDoctypein interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createDocument
- Specified by:
createDocumentin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createElement
public XmlNode createElement(XmlName name, Collection<XmlAttribute> attributes, Collection<XmlNode> children)- Specified by:
createElementin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createProcessing
- Specified by:
createProcessingin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createQualified
- Specified by:
createQualifiedin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-
createText
- Specified by:
createTextin interfaceXmlCallback<XmlName,XmlNode,XmlAttribute>
-