Documentation ¶
Index ¶
- Variables
- type XML
- func (x *XML) Attr(name string) string
- func (x *XML) FindMany(expr string) (output []*XML)
- func (x *XML) FindOne(expr string) (output *XML)
- func (x *XML) GetChild() *XML
- func (x *XML) GetChildren() []*XML
- func (x *XML) HasChildren() bool
- func (x *XML) IsEmpty() bool
- func (x *XML) Parent() *XML
- func (x *XML) RawXML() string
- func (x *XML) SetDataNode(node *XML) bool
- func (x *XML) SetDataText(data string)
- func (x *XML) Text() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidXML = errors.New("data is not in xml format")
Functions ¶
This section is empty.
Types ¶
type XML ¶
type XML struct {
// contains filtered or unexported fields
}
XML is a wrapper of xmlquery.XML. It has additional safety incorporated when querying the contents. This also serves as an abstraction from real implementation which can change. In fact library was changed, this should limit disruption in the future if such issue arises again.
func (*XML) GetChildren ¶
func (*XML) HasChildren ¶
func (*XML) SetDataNode ¶
SetDataNode will attach tree found under the node to current xml as a First element. If this xml object cannot accept then nodes nothing happens. Returns true if set operation was successful.
func (*XML) SetDataText ¶
SetDataText verifies that data type matches the type of xml Node. Changes text.
Click to show internal directories.
Click to hide internal directories.