This example handles a malformed input document.
Input
The second XML document is malformed.
xid | xmldocument |
---|---|
1 | <School name="UCLA"> : <Dept name="EE"> : </Dept> : </School> |
2 | <School /School> name="UTA"> |
SQL Call
SELECT * FROM XMLRelation (
ON xmlrelation_error
USING
TextColumn ('xmldocument')
DocIDColumns ('xid')
MaxDepth (1)
ErrorHandler ('true;xmldocument')
) AS dt;
Output
xid | out_nodeid | element | attributes | value_col | d0id | d1id | errorhandler |
---|---|---|---|---|---|---|---|
1 | 2 | Dept | name=EE | 1 | 2 | ||
1 | 1 | School | name=UCLA | 1 | |||
2 | <School /School> name="UTA"> |