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/13/2007 10:44:00 PM
<jvanderhulst@v...> wrote in message
news:1186993000.533885.39930@q......
> Ok thanks, that has brought me through the syntax check. But now I get
>
> Error Type:
> Microsoft VBScript runtime (0x800A01B6)
> Object doesn't support this property or method
> /SAPReceiveIDOC/XML-izeRequesttoHTTP.asp, line 41
>
> and line 41 is the line that reads
> oPI = objXMLdoc.createProcessingInstruction("xml", "version=""1.0""
> encoding=""UTF-8""")
>
That's my fault. Should be:-
Set oPI = ....
(Mutters underbreath re: stupid Set keyword in VB).
> I moved it up by the way as a child of the top node, as you suggested.
>
> My piece of code is now like this:
>
> -------------
>
> set objXMLdoc = Server.CreateObject ("MSXML2.DOMDocument.3.0")
>
> objXMLdoc.async = False
> objXMLdoc.validateonParse = false
> objXMLdoc.preserveWhiteSpace = false
> objXMLdoc.resolveExternals = false
>
> Dim oPI
> oPI = objXMLdoc.createProcessingInstruction("xml", "version=""1.0""
> encoding=""UTF-8""")
> objXMLdoc.appendChild(oPI)
>
> ' ------------------ Create the root node named Message
> set objXMLroot = objXMLdoc.createElement("Message")
> objXMLdoc.appendChild(objXMLroot)
>
> --------------
>
> So there are 2 children on the top level. Is that how this should be
> done ?
Yes the top level can have a number of nodes but only one of them may be an
element, that is the document root.
> What can this error be ?
The processingInstruction object doesn't have a default property which due
to my omission of the Set keyword VB is misguided into looking for.
--
Anthony Jones - MVP ASP/ASP.NET
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
