Copied from plain tcl xml handler.

Signed-off-by: Matthias Kraft <M.Kraft@gmx.com>
Converted to DOM processing and awaiting optimization and extension.

Signed-off-by: Matthias Kraft <M.Kraft@gmx.com>