Documentation
¶
Index ¶
Constants ¶
View Source
const ( ELEMENT_NODE = iota + 1 ATTRIBUTE_NODE TEXT_NODE CDATA_SECTION_NODE ENTITY_REFERENCE_NODE ENTITY_NODE PROCESSING_INSTRUCTION_NODE COMMENT_NODE DOCUMENT_NODE DOCUMENT_TYPE_NODE DOCUMENT_FRAGMENT_NODE NOTATION_NODE )
View Source
const (
DEBUG = true
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attr ¶
type Attr interface {
Node
OwnerDocument() Document
Name() string
GetValue() string
SetValue(string)
// DOM Level 2
OwnerElement() Element
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-637646024
type CharacterData ¶
type Comment ¶
type Comment interface {
CharacterData
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1728279322
type Document ¶
type Document interface {
Node
DocumentElement() Element
CreateElement(tagName string) Element
CreateTextNode(data string) Text
CreateAttribute(name string) Attr
OwnerDocument() Document
// DOM Level 2
GetElementById(id string) Element
GetElementsByTagName(name string) NodeList
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document
func ParseString ¶
type Element ¶
type Element interface {
Node
TagName() string
GetAttribute(name string) string
GetAttributeNode(name string) Attr
SetAttribute(name string, value string)
SetAttributeNode(newAttr Attr) Attr
RemoveAttribute(name string)
RemoveAttributeNode(oldAttr Attr) Attr
OwnerDocument() Document
GetElementsByTagName(name string) NodeList
HasAttribute(name string) bool
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-745549614
type NamedNodeMap ¶
type NamedNodeMap interface {
Length() uint
Item(index uint) Node
GetNamedItem(name string) Node
SetNamedItem(arg Node) Node
RemoveNamedItem(name string) Node
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1780488922
type Node ¶
type Node interface {
AppendChild(Node) Node
RemoveChild(Node) Node
InsertBefore(Node, Node) Node
ReplaceChild(Node, Node) Node
// attributes
NodeName() string
NodeValue() string
NodeType() uint
ParentNode() Node
ChildNodes() NodeList
Attributes() NamedNodeMap
HasChildNodes() bool
FirstChild() Node
LastChild() Node
PreviousSibling() Node
NextSibling() Node
// contains filtered or unexported methods
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1950641247
type Text ¶
type Text interface {
CharacterData
OwnerDocument() Document
}
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1312295772
Click to show internal directories.
Click to hide internal directories.