Argh. Parsing information from loaded XML (regexp?)

Hi all.

I am trying to import data from a SVG but as i found out, SVG is essentially XML.

I have loaded in the SVG file and managed to output this to the output window:

<svg:path style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 53.8125,53.21875 L 52.84375,53.4375 z" id="path2435"/>

The information i want to extract from this the M and L values.

So at this point i want to cut down the above to…

d="M 53.8125,53.21875 L 52.84375,53.4375"

Firstly im not really sure how to shave off the rest of the garbage to leave me with the above.

Then comes the issue of actually finding what i want to work with. I want to end up with an array of Point objects, So in this example, i would have 2 points in my array:

point1 = (53.8125) , (53.2187)
point2 = (52.8437) , (54.4375)

This seems hugely complicated so i was wondering if anyone can enlighten me? Do i need to use regular expressions for what i want to do and if so, do you have any tips?

Thanks :smiley: