Convert a String to XML

T

TheDude5B

Hi,

I have a function which returns a string value, but the string value is
actually XML, so I want to be able to then convert this string value
into an actual XML document.

Is this posible?

Am I going along the correct path doing this:

Dim strPaymentResponse As String
strPaymentResponse = Service.Trans(guid, name, id, no,
reference, card, cv2, issue, expiry, start, value, mode)

Dim XmlResponse As XmlDocument = New XmlDocument()
XmlResponse.Load(New StringReader(strPaymentResponse))

Thanks for your help.
 
P

Peter Bradley

As far as I know, as long as it's valid XML (or at least well-formed,
depending on whether or not you have a DTD/Schema), then it's XML and you
can treat it as such.

Others may know better, of course. Have you tried it?

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,099
Latest member
AmbrosePri
Top