Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HtmlTransformer ¶
type HtmlTransformer interface {
//document functions
CreateElementNode(string) Node
CreateCDataNode(string) Node
String() string
Root() (Node, Node)
Free()
SetMetaEncoding(string) error
// parsing functions
ParseHTML([]byte, []byte, []byte, []byte) error
ParseFragment([]byte, []byte, []byte, []byte) (Node, error)
ParseXML([]byte, []byte, []byte, []byte) error
CreateEmptyDocument([]byte, []byte)
// xpath functions
CheckXPath(string) error
CompileXPath(string) Selector
// css functions
ConvertCSS(string) string
}
type Node ¶
type Node interface {
// attributes
GetAttribute(string) Node
SetAttribute(string, string) Node
RemoveAttribute(string) Node
// insertion
InsertBefore(interface{}) error
InsertAfter(interface{}) error
InsertTop(interface{}) error
InsertBottom(interface{}) error
// axis
FirstChild() Node
LastChild() Node
PreviousSibling() Node
NextSibling() Node
Parent() Node
//selection
SelectXPath(interface{}) ([]Node, error)
SelectXPathByDeadline(interface{}, *time.Time) ([]Node, error)
SelectCSS(string) ([]Node, error)
SelectCSSByDeadline(string, *time.Time) ([]Node, error)
//content
String() string
GetContent() string
SetContent(interface{}) error
GetInnerHtml() string
SetInnerHtml(interface{}) error
GetName() string
SetName(string)
// introspetion
UnderlyingNode() interface{}
IsValid() bool
IsDocument() bool
IsElement() bool
IsText() bool
Is(Node) bool
Path() string
// maintenance
Remove()
Duplicate() Node
}
Click to show internal directories.
Click to hide internal directories.