Package io.github.qishr.cascara.lang.xml.ast
Class XmlNode
java.lang.Object
io.github.qishr.cascara.lang.xml.ast.XmlNode
All Implemented Interfaces:
AstNode
public class XmlNode
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| public Map |
attributes | |
| public List |
children | |
| public String | name | |
| public String | value |
Constructor Summary
| Constructor | Description |
|---|---|
| XmlNode(String name) |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public void | addChild(XmlNode child) | |
| public List<XmlNode> | getChildren() | |
| public XmlNode | getChild(String name) | |
| public String | getTextValue() | |
| public String | getAttribute(String attributeName) | |
| public Set<String> | getAttributeNames() | |
| public String | getName() | |
| public int | getStartLine() | |
| public int | getStartColumn() | |
| public int | getEndLine() | |
| public int | getEndColumn() | |
| public List<CommentAstNode> | getComments() | |
| public String | getAttributeOrDefault(String name, String dflt) |
Field Details
attributes
public Map
children
public List
name
public String name
value
public String value
Method Details
addChild
public void addChild(XmlNode child)
getChildren
public List<XmlNode> getChildren()
Specified By:
getChild
public XmlNode getChild(String name)
getTextValue
public String getTextValue()
getAttribute
public String getAttribute(String attributeName)
getAttributeNames
public Set<String> getAttributeNames()
getName
public String getName()
getStartLine
public int getStartLine()
Specified By:
getStartColumn
public int getStartColumn()
Specified By:
getEndLine
public int getEndLine()
Specified By:
getEndColumn
public int getEndColumn()
Specified By:
getComments
public List<CommentAstNode> getComments()
Specified By:
getAttributeOrDefault
public String getAttributeOrDefault(String name, String dflt)