I know I must be underthinking this, but I really don't know why native toolkits can't just implement some codegen thing that takes XML and produces the above.
Like, all of that should be expressable with just
<graph> <circle /> </graph>