Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: encoding="utf-8" gets suppressed on http post

From: "Anthony Jones" <Ant@------------.--->
To: 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




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent