Documentation
¶
Overview ¶
Package resxml contains common functions to extract information from xml files and feed that information into the resource processing pipeline.
Index ¶
- func Attrs(xe XMLEvent) []xml.Attr
- func ForwardChildren(ctx context.Context, start XMLEvent, xmlC <-chan XMLEvent) <-chan XMLEvent
- func SendXML(ctx context.Context, xmlC chan<- XMLEvent, xml XMLEvent) bool
- func SloppyMatches(n1, n2 xml.Name) bool
- func StreamDoc(ctx context.Context, doc io.Reader) (<-chan XMLEvent, <-chan error)
- func StrictMatches(n1, n2 xml.Name) bool
- type XMLEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardChildren ¶
ForwardChildren takes the provided StartElement and a channel of XMLEvents and forwards that all events onto the returned XMLEvent channel until the matching EndElement to start is encountered.
func SendXML ¶
SendXML sends an XMLEvent to the provided channel and returns true, otherwise if the context is done, it returns false.
func SloppyMatches ¶
SloppyMatches ignores xml.Name Space attributes unless both names specify Space. Otherwise only the Local attribute is used for matching.
func StreamDoc ¶
StreamDoc parses the provided doc and forwards all xml tokens to the returned XMLEvent chan.
func StrictMatches ¶
StrictMatches considers xml.Names equal if both their space and name matches.