Build an SVG tree from rules in an XML document