I've made a quick proof-of-concept app that talks with a web service API - using some XML.
I tested it with code like this
How can I make this exact same kind of XML using a proper XML method?
My production code is going to pass in the un and pw and client_id - so I am either doing a bit of string manipulation here or doing it the proper way.
I have used XDOCUMENT to load up the returned XML stream - just to pop it into a multi-line text box for now (again proof-of-concept time here).
Can I use XDOCUMENT to make this XML string - and really make sure it looks 100% like the example they gave me (as shown in the hardwired strings above)
I tested it with code like this
Code:
Dim postString As String = "<?xml version='1.0'?><txtsig_request version='2.0'>"
postString &= "<credentials><api_username>xyz</api_username><api_password>abc123</api_password>"
postString &= "<client_id>789</client_id></credentials>"
postString &= actionString
postString &= "</txtsig_request>"My production code is going to pass in the un and pw and client_id - so I am either doing a bit of string manipulation here or doing it the proper way.
I have used XDOCUMENT to load up the returned XML stream - just to pop it into a multi-line text box for now (again proof-of-concept time here).
Can I use XDOCUMENT to make this XML string - and really make sure it looks 100% like the example they gave me (as shown in the hardwired strings above)