| Author |
Topic |
|
jubilanttiger
Starting Member
19 Posts |
Posted - 2005-06-03 : 13:52:57
|
| Hi,I have a sql string like this:nameid="Jemmy James" home_address_address1="6 Jenny St." home_address_address2="" home_address_city="Boranta" home_address_state="CT" home_address_zip="21211" home_phone="(212) 544-2121" date_of_birth="08/19/1927" answerlist1="-- Select Below -- "The above is only one string and is stored as a TEXT field in the database. Our application reads the string and parses into question and answer fields and creates a report from it.We are getting an error, and we suspect it due to some speacial charater.My questions is:1. I have heard of some way, where I can post the string on a text pad, save it as a XML file and then open it through IE, so that I can take a good look at the string. Can anyone tell me how I can do this with the above string?2. What are the special charaters when stored a database which cause error generally.. ??Thanks a Lottttt for your time and replyyy |
|
|
nathans
Aged Yak Warrior
938 Posts |
|
|
jubilanttiger
Starting Member
19 Posts |
Posted - 2005-06-03 : 14:07:03
|
| I dont know why the error occurs, and that is why I am trying to look at the string through notepad and convert into an xml type and find the error. So can help me do the following:1. I have heard of some way, where I can post the string on a text pad, save it as a XML file and then open it through IE, so that I can take a good look at the string. Can anyone tell me how I can do this with the above string?By the way the string which I have posted above is only part of the string. The complete string is longer and there are around 30 of them ! |
 |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2005-06-03 : 14:14:48
|
| Not why, but WHAT is the error? Is it erroring on an INSERT? Is it even a SQL error? Application error? And convert to xml type?? You could VIEW the string as an xml doc in a browser if it was wellformed... which it is not, but perhaps you left off the header, nodes, etc. when you cut/pasted into the forum.To do this, just copy it into notepad, save it as [filename].xml and open it in IE. Though, I dont think this will accomplish much of anything. To validate the XML go here:http://www.w3schools.com/dom/dom_validate.asp |
 |
|
|
jubilanttiger
Starting Member
19 Posts |
Posted - 2005-06-03 : 14:26:22
|
| thanks a lot for your replies, Nathans.But, I just pasted the below string, saved it as filename.xml and opened it with IE and below is the error which I am getting !!! Can you please test that?nameid="Jemmy James" home_address_address1="6 Jenny St." home_address_address2="" home_address_city="Boranta" home_address_state="CT" home_address_zip="21211" home_phone="(212) 544-2121" date_of_birth="08/19/1927" answerlist1="-- Select Below -- "The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. --------------------------------------------------------------------------------Invalid at the top level of the document. Error processing resource 'file:///C:/Documents and Settings/jubilanttiger/Desktop/file...nameid="Jemmy James" home_address_address1="6 Jenny St." home_address_address2="" home_address_city="Boranta" home_address_s... |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-06-03 : 14:29:04
|
| You can't do this in XML since it isn't well formed. That's why IE is blowing up. It is not why your application is though. So please post the error from your application.Tara |
 |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2005-06-03 : 14:30:21
|
| Where is the node name?? For example:<customer nameid="Jemmy James" home_address_address1="6 Jenny St." home_address_address2="" home_address_city="Boranta" home_address_state="CT" home_address_zip="21211" home_phone="(212) 544-2121" date_of_birth="08/19/1927" answerlist1="-- Select Below -- " /> |
 |
|
|
jubilanttiger
Starting Member
19 Posts |
Posted - 2005-06-03 : 16:16:17
|
| Thanks a lot guys, I fixed the error. Actually I could not post the error, coz i was getting a generic error message from our application.The error was because the Pre-Defined Enrty & was not stored as & in the database. |
 |
|
|
|