I'm working on a program that uses REXML to parse SVG. One of the test programs declares this entity: <!ENTITY shape " <path d='M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z'/>"> ]> Then later it refers to the entity like this: <g fill="yellow" stroke="red" stroke-width="8" >&shape;</g> How do I get REXML to replace &shape; with its value and then parse it?