Documentation
¶
Index ¶
- Constants
- type ExtendedXmlVisitor
- type SimpleXmlVisitor
- type Stack
- type XmlParser
- func (xp *XmlParser) GetLastLastState() int
- func (xp *XmlParser) GetLastState() int
- func (xp *XmlParser) LastState() int
- func (xp *XmlParser) LastStateName() string
- func (xp *XmlParser) NodeStack() *Stack
- func (xp *XmlParser) Parse() (err error)
- func (xp *XmlParser) PushLastState(lastState int)
- func (xp *XmlParser) SetDoAutoTrimCharData(value bool)
- func (xp *XmlParser) SetDoReportMarginCharData(value bool)
- type XmlVisitor
Constants ¶
View Source
const ( XmlPart_Initial = iota XmlPartStartTag = iota XmlPartEndTag = iota XmlPartCharData = iota )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtendedXmlVisitor ¶
type ExtendedXmlVisitor interface { // Content that comes before one open/close tag and an adjacent one: either // the useless whitespace between two open adjacent tags or two close // adjacent tags or a tangible/empty value between an open and close tag. HandleCharData(data string, xp *XmlParser) error // Example: // // <!-- Comment --> HandleComment(comment string, xp *XmlParser) error // Example: // // <?xml version="1.0" encoding="UTF-8"?> HandleProcessingInstruction(target string, instruction string, xp *XmlParser) error // Example: // // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" // "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> // // <![CDATA[Some text here.]]> HandleDirective(directive string, xp *XmlParser) error SimpleXmlVisitor }
type SimpleXmlVisitor ¶
type SimpleXmlVisitor interface { // The content identifier next to the left angle brack. HandleStart(tagName string, attr map[string]string, xp *XmlParser) error // The content identifier next to the left angle brack. HandleEnd(tagName string, xp *XmlParser) error // Return the value that was found between two tags not having any child // nodes. HandleValue(tagName string, data string, xp *XmlParser) error }
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
func (*Stack) PeekFromEnd ¶
Return the value of the (n-i) node (n being the last node).
type XmlParser ¶
type XmlParser struct {
// contains filtered or unexported fields
}
func (*XmlParser) GetLastLastState ¶
func (*XmlParser) GetLastState ¶
func (*XmlParser) LastStateName ¶
func (*XmlParser) PushLastState ¶
func (*XmlParser) SetDoAutoTrimCharData ¶
func (*XmlParser) SetDoReportMarginCharData ¶
type XmlVisitor ¶
type XmlVisitor interface{}
Click to show internal directories.
Click to hide internal directories.