Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] how to insert the value corresponded to the element in to database

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: phani kumar <phanikumar_vee AT yahoo.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] how to insert the value corresponded to the element in to database
  • Date: Thu, 2 Dec 2004 05:05:16 -0800 (PST)

hi all,

I was writing a code for inserting the the data (value)of the elements into
the database,while traversing the xom tree, when i get an element i am
inserting its value in to database.the problem is the remaining elements in
the database are filled as null.so how to avoid this.

suppose the xml file i am parsing and inserting is
<info>
<name>phani</name>
<age>24</age>
<working>yes</working>
</info>


when i insert this in to database its like

+--------+------+---------+---------------
| name | age | working |
+--------+------+---------+------------------
| phani | NULL | NULL |
| | 24 | NULL |
| | NULL | yes |

it should be like

+--------+------+---------+---------------
| name | age | working |
+--------+------+---------+------------------
| phani | 24 | yes |



can anyone tell me how to do this.thanks in advance

Regards,
phani.









---------------------------------
Do you Yahoo!?
The all-new My Yahoo! – What will yours do?
>From elharo AT metalab.unc.edu Thu Dec 2 08:19:34 2004
Return-Path: <elharo AT metalab.unc.edu>
X-Original-To: xom-interest AT lists.ibiblio.org
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202])
by happyhouse.metalab.unc.edu (Postfix) with ESMTP id D06874C006
for <xom-interest AT lists.ibiblio.org>;
Thu, 2 Dec 2004 08:19:33 -0500 (EST)
Received: (qmail 3172 invoked from network); 2 Dec 2004 13:19:33 -0000
Received: from dsl254-085-072.nyc1.dsl.speakeasy.net (HELO [192.168.254.47])
(elharo@[216.254.85.72]) (envelope-sender <elharo AT metalab.unc.edu>)
by mail2.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted
SMTP
for <phanikumar_vee AT yahoo.com>; 2 Dec 2004 13:19:32 -0000
Message-ID: <41AF1664.3000508 AT metalab.unc.edu>
Date: Thu, 02 Dec 2004 08:19:32 -0500
From: Elliotte Harold <elharo AT metalab.unc.edu>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.7.3) Gecko/20040910
X-Accept-Language: en-us, en, fr
MIME-Version: 1.0
To: phani kumar <phanikumar_vee AT yahoo.com>
Subject: Re: [XOM-interest] how to insert the value corresponded to the
element
in to database
References: <20041202130516.33533.qmail AT web12826.mail.yahoo.com>
In-Reply-To: <20041202130516.33533.qmail AT web12826.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: xom-interest AT lists.ibiblio.org
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: xom-interest.lists.ibiblio.org
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Dec 2004 13:19:34 -0000


There's a bug in your code, probably involving a misplaced loop or a bad
SQL statement, but without seeing your program there's no way we can
tell exactly what the bug is.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page