Reading xml file into database table produces extra characters in the the table column.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi;
I am attempting to store XML data into a database table field which works but the there are some
extra characters which are included with the string. i.e. ascii charaters whch look like two boxes followed
by the string value.

Is this the result of reading in the XML using the outer element :
<span style="font-size:small <span style="font-size:small <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <a> <span style="font-size:small <span style="font-size:small <span style="font-size:small <span style="font-size:small
<pre>XmlNodeList
elem_IDNumber = incomingxml_doc.GetElementsByTagName("IDNUM");
String IDNumber = elem_LoanNumber[0].InnerText; [/code]
<pre class="prettyprint cmd.CommandType = CommandType.StoredProcedure;
//Loan Number Param
cmd.Parameters.Add("@LNKEY", SqlDbType.VarChar, 20).Value = Id_Num;[/code]
Or are these characters added when I add a parameter to my database table ?
<br/>

Here is a test XML file that I use too:
<pre class="prettyprint <DataFeedback DocId="999999999-9999-9" IDNumber="000000000" AsOf="2010-11-10T10:33:06.093" FeedbackType="AIXML" FeedbackStatusCode="" FeedbackMessage="n/a
<Contents>
<Content Name="OADI" Type="XML
<Data>
<IDNUM>
<NUM>
123456
</NUM>
</NUM>
</Data>
</Content>
</Contents>
</DataFeedback>[/code]
Thanks for any insights !<br/>


<hr class="sig GeeMann

View the full article
 
Back
Top