Documentation
¶
Overview ¶
Package parser parses XML files into generic model.Record values using a caller-supplied, config-driven field mapping. There is no hardcoded XML schema anywhere in xpro-oss — point it at any XML shape by editing the `mapping` section of config.yaml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mapping ¶
type Mapping struct {
Column string
Const *string // non-nil: use this literal value (even ""), ignore path
// contains filtered or unexported fields
}
Mapping is a precompiled config.MappingField — compiled once at startup so repeated Parse calls don't recompile XPath expressions per file. The compiled path is unexported: Compile is the only correct constructor, and this keeps the third-party xmlpath.Path type out of this package's public API (so swapping the underlying XPath library later isn't a breaking change).