Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 74784 invoked from network); 4 Jul 2010 08:49:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Jul 2010 08:49:41 -0000 Received: (qmail 38332 invoked by uid 500); 4 Jul 2010 08:49:40 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 38072 invoked by uid 500); 4 Jul 2010 08:49:36 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 38064 invoked by uid 99); 4 Jul 2010 08:49:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jul 2010 08:49:35 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [145.58.30.185] (HELO out1b.mail.omroep.nl) (145.58.30.185) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jul 2010 08:49:26 +0000 Received: from localhost (ou1bclean [10.10.30.159]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id E75593000108 for ; Sun, 4 Jul 2010 10:49:05 +0200 (CEST) X-Virus-Scanned: NPO ICT Received: from tweehoog.vpro.nl (tweehoog.vpro.nl [145.58.169.4]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id C7E043000100 for ; Sun, 4 Jul 2010 10:49:05 +0200 (CEST) Received: from exmail.vpro.nl ([145.58.171.81] helo=VS-EX-01.intra.vpro.nl) by tweehoog.vpro.nl with esmtp (Exim 3.36 #1) id 1OVKsr-000827-00 for user@couchdb.apache.org; Sun, 04 Jul 2010 10:49:05 +0200 Received: from VS-EX-01.intra.vpro.nl ([145.58.171.81]) by VS-EX-01.intra.vpro.nl ([145.58.171.81]) with mapi; Sun, 4 Jul 2010 10:49:05 +0200 From: Nils Breunese To: "user@couchdb.apache.org" Date: Sun, 4 Jul 2010 10:49:04 +0200 Subject: RE: Problems inserting XML document into CouchDB 0.10.2 on CentOS 5.4 Thread-Topic: Problems inserting XML document into CouchDB 0.10.2 on CentOS 5.4 Thread-Index: AcsXsZKOzWd0ZDzkQ8ey3U1GHUptvwDoeq9m Message-ID: References: <054DFED363B4F541B6CC4DDACD651CAE17FE77@DAEMSG01.eur.ad.sag> In-Reply-To: <054DFED363B4F541B6CC4DDACD651CAE17FE77@DAEMSG01.eur.ad.sag> Accept-Language: nl-NL Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: nl-NL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org =3D=3D XML =3D=3D Remember that CouchDB uses JSON for documents. I think you have three optio= ns here: 1. Convert XML to a JSON document Instead of storing the XML you mentioned you could maybe transform your XML= into JSON (not always easy, as attributes and subelements can clash, the o= ther way around is easier): ---- { "type": "note", "to": "Tove", "from": "Jani", "heading": "Reminder", "body": "Don't forget me this weekend!" } ---- 2. Store the XML as a string field I believe this is what you were trying to do. Surround the XML with quotes = and escape any quotes in the XML. I believe most XML libraries have a funct= ion to output XML as a string with all escaping done automatically. { "XML": "ToveJaniReminderDon't forget me this weekend!" } 3. Store the XML as an attachment You can store arbitrary files as attachments to CouchDB documents. I'd go route 1, as that will allow you to make use of CouchDB's indexing fe= atures, etc. If you just want to store the data, all three options will wor= k. =3D=3D curl >=3D7.18 and RHEL/CentOS =3D=3D About the curl >=3D7.18 dependency, I don't know why 7.18 exactly, but I'm = sure the dependency version hasn't been changed for no reason. People have = built CouchDB 0.11 on RHEL/CentOS 5, but yes, you'll need to install a sepa= rate curl >=3D7.18 build. You could just install curl from source. Or you c= ould package curl >=3D 7.18 for installation in a location where it doesn't= clash with the OS curl package and build CouchDB to find curl >=3D7.18 the= re, or maybe include curl >=3D7.18 in the CouchDB package itself and make i= t a selfcontained package. It's not impossible, it's just more work than wh= en you're able to use the vendor's curl package. Nils. ________________________________________ Van: Himmelein, Ralf [Ralf.Himmelein@softwareag.com] Verzonden: dinsdag 29 juni 2010 19:36 Aan: user@couchdb.apache.org Onderwerp: Problems inserting XML document into CouchDB 0.10.2 on CentOS 5.= 4 Hello CouchDB experts, I am using CouchDB at the moment for a potential large scale implementation= . I am faced with the problem that I can't insert a simple XML document into my CouchDB via the Futon interface. The CouchDB is version 0.10.2 installed on CentOS. The error message that I= get on the UI is that the data I insert is not a string. The document I try to insert looks like this: Tove Jani Reminder Don't forget me this weekend! If I mask the the data with "" I can insert the data, but since I plan to i= nsert XML documents I can have "" everywhere. At the moment this is a show stopper and I wonder if there is a special way= or procedure on how to store XML data within CouchDB. The second question I have is, why is CouchDB 0.11 depended on curl 7.18? T= his fact makes building the new CouchDB version impossible without breaking a lot of things within the CentOS (RHEL 5). Has anyone eve= ntually produced a how to for CentOS on how to build CouchDB 0.11 for CentOS? Thanks in advance, Ralf Himmelein De informatie vervat in deze e-mail en meegezonden bijlagen is uitsluitend= bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informati= e bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekk= ing van deze informatie aan derden is voorbehouden aan geadresseerde. De VP= RO staat niet in voor de juiste en volledige overbrenging van de inhoud van= een verzonden e-mail, noch voor tijdige ontvangst daarvan.