Thread: how to store whole XML file in database
hi,,
i have to insert whole xml file in database ,there is a text field for that.but it shows error parse error where there are attribute ..plz help me out.
i have to insert whole xml file in database ,there is a text field for that.but it shows error parse error where there are attribute ..plz help me out.
deepak pal wrote: > hi,, > i have to insert whole xml file in database ,there is a text > field for that.but it shows error parse error where there are > attribute ..plz help me out. I'm guessing you have a quoting problem. Try escaping the XML-data before inserting it into the database, so that any single quotes doesn't mess up your insert statements. -- Tommy
You’ll have to escape any quotation marks or your SQL will not parse your strings correctly.
--
Brandon Aiken
CS/IT Systems Engineer
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of deepak pal
Sent: Monday, February 12, 2007 4:07 AM
To: PostgreSQL - General
Subject: [GENERAL] how to store whole XML file in database
hi,,
i have to insert whole xml file in database ,there is a text field for that.but it shows error parse error where there are attribute ..plz help me out.
** LEGAL DISCLAIMER **
Statements made in this e-mail may or may not reflect the views and opinions of Wineman Technology, Inc. or its employees.
This e-mail message and any attachments may contain legally privileged, confidential or proprietary information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.
Brandon Aiken wrote: > You'll have to escape any quotation marks or your SQL will not parse > your strings correctly. And you have to do this for all your data, not just XML. Otherwise the first Mr. O'Malley you have a record for will break your application. -- Richard Huxton Archonet Ltd