I'm running the following line of code on XML objects and getting inconsistent results:
data.path[...@d[0] In 3 cases, I get a valid answer. In the last case, data.path[0] == null and thus errors. Can anyone see any difference? The valid XML are: <g transform="matrix(0 -1 1 0 50 112.5)" improv:classname="image" id="Object07B" xmlns="http://www.w3.org/2000/svg" xmlns:pdf=" http://ns.adobe.com/pdf/2006" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:improv="http://ns.colorquick.com/improv/mars"> <image height="75" width="75" x="12.5" xlink:href="/images/Smiley.png" y="150" improv:rotation="-90"/> <path d="M 12.5 150 L 87.5 150 L 87.5 75 L 12.5 75 C 22.5 65 22.5 160 12.5 150" stroke-width="0" improv:classname="border"/> </g> <g transform="matrix(1 0 0 1 150 112.5)" improv:classname="image" id="ObjectD6B" xmlns="http://www.w3.org/2000/svg" xmlns:pdf=" http://ns.adobe.com/pdf/2006" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:improv="http://ns.colorquick.com/improv/mars"> <image height="75" width="75" x="112.5" xlink:href="/images/Smiley.jpg" y="75" improv:rotation="0"/> <path d="M 112.5 75 L 187.5 75 L 187.5 150 L 112.5 150 C 122.5 140 122.5 85 112.5 75" stroke-width="0" improv:classname="border"/> </g> <g transform="matrix(1 0 0 1 10 430)" improv:classname="text" id="Object817" xmlns="http://www.w3.org/2000/svg" xmlns:pdf="http://ns.adobe.com/pdf/2006" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:improv=" http://ns.colorquick.com/improv/mars"> <text fill="rgb(0,0,0)" font-family="F1" font-size="12" x="10" y="420.763671875" improv:rotation="0" width="289.9453125" height="11.26171875">Ipsor Lopsumething and other things that will test stuff.</text> <path d="M 10 420.763671875 L 299.9453125 420.763671875 L 299.9453125 432.025390625 L 10 432.025390625 L 10 420.763671875" stroke-width="0" improv:classname="border"/> </g> The XML that throws the error is: <g transform="matrix(1 0 0 1 0 0)" improv:classname="text" id="ObjectE68" xmlns="http://www.w3.org/2000/svg" xmlns:pdf="http://ns.adobe.com/pdf/2006" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:improv=" http://ns.colorquick.com/improv/mars"> <text fill="rgb(0,0,0)" font-family="Arial" font-size="12" x="57.1" y="185.2" improv:rotation="0" width="97.65" height="92"/> <path d="M 57.1 185.2 L 154.75 185.2 L 154.75 277.2 L 57.1 277.2 L 57.1 185.2" stroke-width="0" improv:classname="border"/> </g>

