[PD] parsing XML

Iain Mott mott at reverberant.com
Tue Jun 11 13:56:53 CEST 2013

Hi list,

I have a "string2any" object which is outputting XML that mostly looks
like this when sent to a print object:

print: <update><source id='1' level='-86.6183'/></update>
print: <update><source id='1' level='-87.9314'/></update>
print: <update><source id='1' level='-85.5559'/></update>
print: <update><source id='1' level='-83.4277'/></update>
print: <update><source id='1' level='-83.5981'/></update>


My patch doesn't need this information, only 'position' information, and
when something important happens, data with x and y coordinates is
outputted by string2any like this:

print: <update><source id='1'><position x='1.19286'
My patch needs to extract the x and y values as floats.

I'm a bit rusty with Pd and I've not been able to work out how to do
this. Can anyone please suggest what externals/techniques to use?



More information about the Pd-list mailing list