SQLxD Part 3 — Model and parsing XML

This is the third part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation

We want to represent nodes in the following way:

Node has its type, name, pointer to parent, and identifier. Type is one of these:

Now we can parse the document:

We simply traverse whole document and create nodes for every XML node.