You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by bsquared <bw...@gmail.com> on 2012/03/19 01:20:33 UTC
Is it possible to perform a transform on a bulk insert
Hello all,
I would like to make a basic couchapp that can take the xml returned
from a web app and transform it using a supplied xslt file. The result
of this would be cleaned a bit and posted to the database.
Specifically, I want to move my Google bookmarks to a couchdb
instance.
http://www.google.com/bookmarks/?output=xml
or
http://www.google.com/bookmarks/?output=rss
Unfortunately, Google no longer offers json as an output option. It
must have gone away with the notebook api.
Any suggestions?
Thank you.
Regards, Brian
Re: Is it possible to perform a transform on a bulk insert
Posted by bsquared <bw...@gmail.com>.
Simon Metson <si...@cern.ch> writes:
> Yeah, doing what you want with a little script should be trivial.
>
Thank you. I'll have to look into it. Any suggestions?
Regards,
Brian
Re: Is it possible to perform a transform on a bulk insert
Posted by Simon Metson <si...@cern.ch>.
Yeah, doing what you want with a little script should be trivial.
On 19 March 2012 17:49, bsquared <bw...@gmail.com> wrote:
>> Hi,
>> No, that's not really possible, since the couchapp is sandboxed in the
>> browser. You could use an _external handler to do it:
>> http://wiki.apache.org/couchdb/ExternalProcesses
>> http://davispj.com/2010/09/26/new-couchdb-externals-api.html but you
>> need direct acces to the server which you may or may not have if
>> you're using a hosted Couch instance.
>> Cheers
>> Simon
>>
> Thank you.
>
> That is unfortunate. Perhaps it can be done in client scripting.
>
> Regards,
> Brian
>
Re: Is it possible to perform a transform on a bulk insert
Posted by bsquared <bw...@gmail.com>.
> Hi,
> No, that's not really possible, since the couchapp is sandboxed in the
> browser. You could use an _external handler to do it:
> http://wiki.apache.org/couchdb/ExternalProcesses
> http://davispj.com/2010/09/26/new-couchdb-externals-api.html but you
> need direct acces to the server which you may or may not have if
> you're using a hosted Couch instance.
> Cheers
> Simon
>
Thank you.
That is unfortunate. Perhaps it can be done in client scripting.
Regards,
Brian
Re: Is it possible to perform a transform on a bulk insert
Posted by Simon Metson <si...@cern.ch>.
Hi,
No, that's not really possible, since the couchapp is sandboxed in the
browser. You could use an _external handler to do it:
http://wiki.apache.org/couchdb/ExternalProcesses
http://davispj.com/2010/09/26/new-couchdb-externals-api.html but you
need direct acces to the server which you may or may not have if
you're using a hosted Couch instance.
Cheers
Simon
On 19 March 2012 15:45, bsquared <bw...@gmail.com> wrote:
> Thank you. I may not have been clear enough. I am able to perform the
> steps necessary by hand, but I would like to automate them in a
> couchapp.
>
> Regards,
> Brian
>
Re: Is it possible to perform a transform on a bulk insert
Posted by bsquared <bw...@gmail.com>.
Thank you. I may not have been clear enough. I am able to perform the
steps necessary by hand, but I would like to automate them in a
couchapp.
Regards,
Brian
Re: Is it possible to perform a transform on a bulk insert
Posted by CGS <cg...@gmail.com>.
Hi,
Considering you don't want to write your own application to do that, I
suppose you can use a XML to JSON conversion. Just take a look at these two
examples I found Google-ing:
http://www.thomasfrank.se/xml_to_json.html
http://www.fyneworks.com/jquery/xml-to-json/
Once you have the JSON from your Google bookmarks, it's simple to insert
them in CouchDB.
CGS
On Mon, Mar 19, 2012 at 1:20 AM, bsquared <bw...@gmail.com> wrote:
> Hello all,
>
> I would like to make a basic couchapp that can take the xml returned
> from a web app and transform it using a supplied xslt file. The result
> of this would be cleaned a bit and posted to the database.
>
> Specifically, I want to move my Google bookmarks to a couchdb
> instance.
>
> http://www.google.com/bookmarks/?output=xml
> or
> http://www.google.com/bookmarks/?output=rss
>
> Unfortunately, Google no longer offers json as an output option. It
> must have gone away with the notebook api.
>
> Any suggestions?
>
> Thank you.
>
> Regards, Brian
>
>