Documentation
¶
Index ¶
- func ExtractAllTags(xmlStr, tagName string) []string
- func ExtractAttr(xml, attr string) string
- func ExtractAttrInTag(xml, tagName, attr string) string
- func ExtractMultipleTags(xml, tag string) []string
- func ExtractTagValue(xml, tag string) string
- func MustAtoi(s string) int
- func MustAtoi64(s string) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAllTags ¶
func ExtractAttr ¶
ExtractAttr finds the first occurrence.
func ExtractAttrInTag ¶
ExtractAttrInTag finds attr only in a specific tag.
func ExtractMultipleTags ¶
ExtractMultipleTags returns all matches for <tagName>...</tagName> or self-closing <tagName ... />.
func ExtractTagValue ¶
ExtractTagValue extracts the text inside a given XML tag. Example: <jid>foo@bar</jid> => "foo@bar"
func MustAtoi64 ¶
MustAtoi64 converts string to int64, panics if conversion fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.