Supported in: Batch, Streaming
Parses xml strings following the given schema definition, ignoring any fields not in the schema.
Expression categories: File, Struct
Output type: Struct
Argument values:
xml
xml | Output |
---|---|
<airline> <id>XB-112</id> <airport> <id>JFK</id> <miles>2000</miles> </airport> </airline> | { airport: { id: JFK, miles: 2000, }, id: XB-112, } |
Description: When namespace is ignored, parsing ignores namespace in the data. Note that namespaces in the schema will never match a key since the namespace is filtered. Argument values:
xml
xml | Output |
---|---|
<ns1> <ns1>John Doe</ns1> <ns1>john.doe@example.com</ns1... | { address: { city: Exampleville, nevermatches: null,... |
Description: When a requested field is missing in the input XML the field becomes null. Argument values:
xml
xml | Output |
---|---|
<airline> <id>XB-112</id> <airport> <id>JFK</id> </airport> </airline> | { airport: { id: JFK, miles: null, }, id: XB-112, } |
Description: When the requested schema is too small, only the fields in the schema are parsed. Argument values:
xml
xml | Output |
---|---|
<airline> <id>XB-112</id> <airport> <id>JFK</id> </airport> </airline> | { id: XB-112, } |
Description: You can read attributes by putting attribute prefix in front of the name. Argument values:
xml
xml | Output |
---|---|
<airline> <id>XB-112</id> <airport id="JFK"> <miles>2000</miles> </airport> </airline> | { airport: { _id: JFK, miles: 2000, }, id: XB-112, } |