The existing xmlTokenizer can tokenize an XML document using the specified element tag name and produce a series of tokens that are either the child tokens with the injected namespace declarations from its parent node or the tokens wrapped in their ancestor elements.
That implementation has several limitations:
- a specific namespace cannot be specified.
- a specific hierarchy cannot be specified.
- the wrap mode assumes each token to have the same ancestor path.
This patch will remove these limitations.