473,326 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Reading Non-standard XML

When we send in credit card info, we get this in reply:

<auth_resp xmlns="urn:auth"><auth_info_resp
id="A1"><order_id>2XXXJl</order_id>
<shopper_id></shopper_id>
<total_amount>0.01</total_amount>
<settlement_amount>0.00</settlement_amount>
<action>X</action>
<response_code>9</response_code>
<response_desc>This order reference has already been processed .
</response_desc></auth_info_resp></auth_resp>

It's returned in xmlnode variable. We'd like to read the variables but
when I load it into an xml reader, it gives an error, saying the file isn't
xml compatible.
Nov 12 '05 #1
2 1402
There isn't anything wrong with this XML as far as I can see. Can you
provide more info, for example the entire file and the code you are using to
load it?

"Jim Bayers" <sp**@spamity.spam> wrote in message
news:Xn*****************************@207.46.248.16 ...
When we send in credit card info, we get this in reply:

<auth_resp xmlns="urn:auth"><auth_info_resp
id="A1"><order_id>2XXXJl</order_id>
<shopper_id></shopper_id>
<total_amount>0.01</total_amount>
<settlement_amount>0.00</settlement_amount>
<action>X</action>
<response_code>9</response_code>
<response_desc>This order reference has already been processed .
</response_desc></auth_info_resp></auth_resp>

It's returned in xmlnode variable. We'd like to read the variables but
when I load it into an xml reader, it gives an error, saying the file isn't xml compatible.

Nov 12 '05 #2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim stream As StringReader
Dim reader As XmlTextReader = Nothing
stream = New StringReader(strxml)

stream = New StringReader(strxml)
' Load the XmlTextReader from the stream
reader = New XmlTextReader(stream)

'FormatXml(reader)
While reader.Read()
Literal1.Text += reader.Value()

End While

reader.Close()

End Sub
"Chris Lovett" <cl*****@microsoft.com.no_spam> wrote in
news:ug**************@TK2MSFTNGP10.phx.gbl:
There isn't anything wrong with this XML as far as I can see. Can you
provide more info, for example the entire file and the code you are
using to load it?

"Jim Bayers" <sp**@spamity.spam> wrote in message
news:Xn*****************************@207.46.248.16 ...
When we send in credit card info, we get this in reply:

<auth_resp xmlns="urn:auth"><auth_info_resp
id="A1"><order_id>2XXXJl</order_id>
<shopper_id></shopper_id>
<total_amount>0.01</total_amount>
<settlement_amount>0.00</settlement_amount>
<action>X</action>
<response_code>9</response_code>
<response_desc>This order reference has already been processed .
</response_desc></auth_info_resp></auth_resp>

It's returned in xmlnode variable. We'd like to read the variables
but when I load it into an xml reader, it gives an error, saying the
file

isn't
xml compatible.



Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roger Godefroy | last post by:
Hi there... I want to read fieldvalues from out of a dynamicaly created table (php). But this has to be done by JavaScript. Every row of the table has a select-box, inputbox and a order-button....
4
by: Mark Stijnman | last post by:
A while ago I posted a question about how to get operator behave differently for reading and writing. I basically wanted to make a vector that can be queried about whether it is modified recently...
6
by: sbalko | last post by:
Hi, I am trying to read Java-floats (IEEE 754 encoding) stored in a binary file from C (gcc on linux/i386, more specifically). Unfortunately, C seems to expect floats to be stored somewhat...
6
by: dough | last post by:
Heres a snippet of my code. I am trying to dynamically allocate memory for reading in strings from a file. FILE *f; /* file to read */ char *s; ...
16
by: Ali | last post by:
Hi I want to write (or read) to a stream, but the data is not byte array I converted the data to byte array manually, but it is very slow, (becuse the data is very large) Is another way for this...
4
by: Jason Kumpf | last post by:
OK I've been staring at this code all day and still with everything I have tried I cannot figure out two problems I am having. Once is why the space limit for the directory I create in the code...
10
by: jcsnippets.atspace.com | last post by:
Hi everybody, I'm trying to read a file containing a list of addresses. Most of these addresses are based in Germany, so there are a lot of names which have special characters like München and...
1
by: R.A.M. | last post by:
Hello, Could you help me please with a problem of reading utf-8 file with non-ASCII (Polish) letters? I have written such code: DirectoryInfo D = new...
6
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
24
by: arnuld | last post by:
I have a function named getword that read every single input from std. input. WHAT I WANTED: I want it read the word if it has less than or equal to 30 characters. Anything else beyond that...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.