get xml file

marcc's icon

Hi everybody.
I'm trying to get an xml file from the web in order to provide dynamic text to a jitter animation.
I can't find information about that,
any advice will be welcome.
thanks

nick rothwell | project cassiel's icon

On 21 Jan 2009, at 09:42, marcc wrote:

> I'm trying to get an xml file from the web in order to provide
> dynamic text to a jitter animation.
> I can't find information about that,

Getting it is easy; how will you be parsing it? XPath?

You could probably use Jython (www.loadbang.net/space/Software/net.loadbang.jython)
and some Java libraries: I've used Xerces and Jaxen for parsing web-
fetched XML without problems.

    -- N.

Nick Rothwell / Cassiel.com Limited
www.cassiel.com
www.myspace.com/cassieldotcom
www.last.fm/music/cassiel
www.reverbnation.com/cassiel
www.linkedin.com/in/cassiel
www.loadbang.net

pure's icon

check the helpfile of jit.uldl

p

marcc wrote:
> Hi everybody.
> I'm trying to get an xml file from the web in order to provide dynamic text to a jitter animation.
> I can't find information about that,
> any advice will be welcome.
> thanks
>
>
>

--

nick rothwell | project cassiel's icon

On 21 Jan 2009, at 10:30, pure wrote:

> check the helpfile of jit.uldl

Indeed - that'll handle the transfer, but not any parsing (assuming
you need any).

    -- N.

Nick Rothwell / Cassiel.com Limited
www.cassiel.com
www.myspace.com/cassieldotcom
www.last.fm/music/cassiel
www.reverbnation.com/cassiel
www.linkedin.com/in/cassiel
www.loadbang.net

marcc's icon

thanks for this quick answer..
I hoped max had any built-in xml parsing tool...
I've nerver tried java programming but never mind, it's time to dive in!

Luke Hall's icon

There is an external that extracts data from xml files, it's called [detox] by Jasch and you can find it here:

lh

marcc's icon

thanks i'll try this

Luke Hall's icon

You could also use [regexp] to parse text (or [jit.str.regexp] as you're working from a jitter object), but this could become a bit complicated depending on what you are looking for in the text and the ways in which it might appear.

lh

m's icon
Jean-Francois Charles's icon

There is a parser in the tap.tools as well.
J-F.

>
> thanks for this quick answer..
> I hoped max had any built-in xml parsing tool...
> I've nerver tried java programming but never mind, it's time to dive in!

pure's icon

Nick Rothwell wrote:
> On 21 Jan 2009, at 10:30, pure wrote:
>
>> check the helpfile of jit.uldl
>
> Indeed - that'll handle the transfer, but not any parsing (assuming
> you need any).
maybe i misunderstood the original question but i thought it was just
about downloading...

p

--

robert's icon

Obtaining XML is best done in what's called a "RESTful" way (REST).

Simple http request, obtain the results in text format, parse through
them like you would with Flash ActionScript and then deal with the
data and it's references.

The same is done of course for submissions. Long binary data
including RFC uploads can be done via http, but the binary (a file) is
usually done through the "FILE1" field of a form.

-r

On Jan 22, 2009, at 12:21 PM, pure wrote:

> Nick Rothwell wrote:
>> On 21 Jan 2009, at 10:30, pure wrote:
>>
>>> check the helpfile of jit.uldl
>>
>> Indeed - that'll handle the transfer, but not any parsing (assuming
>> you need any).
> maybe i misunderstood the original question but i thought it was
> just about downloading...
>
> p
>
> --
>
> http://pure.test.at
> http://www.myspace.com/pvre
> http://www.heartchamberorchestra.org
> http://www.trblnc.org
>

marcc's icon

I used jash object...
and found this hepful patch:https://cycling74.com/forums/index.php?t=msg&goto=78731&rid=0&srch=toxine+xml#msg_78731
I had a question about the osc route from the CNMAT:
in the example, the xml file does not contain overlapped tags
I mean it's a simple form
info1
info2
info3
BUt when i'm in front more detailes xmlfile like that:

aaa bbb
i try to put an oth
er osc route object to split the content of a tag but it simply does not work..
how could I do?
thanks for your answers.

marcc's icon

any advice about this last point?

Luke Hall's icon

Are you using [OSC-route] to try to parse the xml? You should be using the jasch [detox] external for this task, like mentioned earlier. If you look at the help file you should be able to see how it parses multi-embedded tags.

lh

marcc's icon

I managed to parse xml thanks to jash object.
but my last question was just by curiosity,
I found this example patch (linked above)
and wondered how to parse embeded xml thanks to osc routing object.
but that's not important, it was just to understand...
thanks lh