Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseItems ¶
func ParseItems[T any](ctx context.Context, order TokenParseOrder) rxgo.Observable
ParseItems reads annotated item of types T with context.Context. TokenParseOrder will dictate current io.Reader position and io.Closer for resource
Types ¶
type Decoder ¶
type Decoder interface {
Token() (xml.Token, error)
DecodeElement(v any, start *xml.StartElement) error
}
Decoder abstracts *xml.Decoder for xml parse
type Parser ¶
type Parser[T any] interface { Parse(ctx context.Context, order TokenParseOrder) rxgo.Observable }
Parser abstracts parser object that parses given io.Reader into data.Transform. Internal parse mechanism is up to how ParseFunc is implemented.
type TokenMatcher ¶
func NewStartTokenNameMatcher ¶
func NewStartTokenNameMatcher(name string) TokenMatcher
type TokenParseOrder ¶
TokenParseOrder works as input source, decoder and matcher for given source. Match function is the key function to determine target types and value of token.
func SimpleTokenOrder ¶
func SimpleTokenOrder(source io.ReadCloser, localName string) TokenParseOrder
SimpleTokenOrder returns TokenParseOrder implementation that matches specific localName of the token from XML stream.
Click to show internal directories.
Click to hide internal directories.