![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: encoding="utf-8" gets suppressed on http post >Thread Next - Re: encoding="utf-8" gets suppressed on http post Re: encoding="utf-8" gets suppressed on http postTo: NULL Date: 8/10/2007 8:15:00 AM
Thanks Anthony for your response;
Ok, I have taken up your suggestion. In my code I have built up an XML
tree which is a piece of code that I know to be working for other
purposes.
The important parts are these:
' Create the XML object
set objXMLdoc = Server.CreateObject ("MSXML2.DOMDocument.3.0")
objXMLdoc.async = False
objXMLdoc.validateonParse = false
objXMLdoc.preserveWhiteSpace = false
objXMLdoc.resolveExternals = false
' ------------------ Create the root node named Message
set objXMLroot = objXMLdoc.createElement("Message")
objXMLdoc.appendChild(objXMLroot)
' Create the Order element
set objXMLOrderNode = objXMLDoc.createNode ("element", "Order","")
objXMLdoc.documentElement.appendChild(objXMLOrderNode)
{ Other leaves in the tree are inserted ....}
' Create the Certificate Codenode
set objItemNum = objXMLdoc.createNode("element", "CertificateCode","")
objItemNum.Text = "3"
objXMLOrderItemNode.appendChild(objItemNum)
set objItemNum = Nothing
dim xmlHttp
set xmlHttp = server.CreateObject ("MSXML2.ServerXMLHTTP.3.0")
objXMLdoc.xml.createProcessingInstruction ("xml", "version=""1.0""
encoding=""UTF-8""")
call xmlHttp.open ("POST", "http://server....",False)
xmlHttp.send (objXMLdoc.xml)
--------------
but then I get this: Cannot use parentheses when calling a Sub
/SAPReceiveIDOC/XML-izeRequesttoHTTP.asp, line 171, column 87
objXMLdoc.xml.createProcessingInstruction ("xml", "version=""1.0""
encoding=""UTF-8""")
--------------------------------------------------------------------------------------
^
The up arrow is actually positioned at the closing bracket.
I am not too familiair with ASP coding. I notice that on your example
sometimes there are no brackets where I have them but I picked those
up from other code samples.
So how exactly do I stick these processing instructions in the XML ?
And I should send objXMLdoc instead of without the objXMLdoc.xml ?
Enjoy your weekend, Jo
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
