Le 11/06/2013 13:56, Iain Mott a écrit : > 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> > > etc. > > 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' > y='0.992857'/></source></update> > > 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? > > Thanks! > > Iain > > > _______________________________________________ > Pd-list@iem.at mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list Maybe, something like that could help ? (patch attached to this mail). ++
Jack
get_float_in_string.pd
Description: application/puredata
_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list