[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to specify a Processing Instruction? (better: how tocontrolencod

  • From: ComCity <mikeb@c...>
  • To: Julian Reschke <julian.reschke@g...>, xml-dev@l...
  • Date: Wed, 29 Aug 2001 15:22:53 -0700

loadxml fail
----- Original Message -----
From: Julian Reschke <julian.reschke@g...>
To: ComCity <mikeb@c...>; <xml-dev@l...>
Sent: Wednesday, August 29, 2001 3:04 PM
Subject: RE: How to specify a Processing Instruction? (better: how to
controlencoding on saving)


> > From: ComCity [mailto:mikeb@c...]
> > Sent: Thursday, August 30, 2001 12:00 AM
> > To: Julian Reschke; xml-dev@l...
> > Subject: Re: How to specify a Processing Instruction? (better: how to
> > controlencoding on saving)
> > ...
> > > Then obviously something is wrong on *your* side. Or do you
> > happen to use
> > > loadXML()? In which case I recommend to read the SDK
> > documentation and the
> > > MSDN article about encodings
> > >
> > (<http://msdn.microsoft.com/library/default.asp?url=/library/en-us
> > /dnxml/htm
> > > l/xmlencodings.asp>).
> >
> > Yes, I do use loadXML and not load.  I have read this article
> > about 10 times
> > already.  However, reading again after your and others posts has
>
> Maybe you should read it again and pay attention to:
>
> "The LoadXML method always takes a Unicode BSTR that is encoded in UCS-2
or
> UTF-16 only. If you pass in anything other than a valid Unicode BSTR to
> LoadXML, it will fail to load."

Well, that can't be.  LoadXML is used in numerous other places in the code,
that don't fail.  And, in the code I'm looking at, LoadXML just reads in
plain old xml in plain old ASCII non Unicode BSTR and it does not fail.  For
instance, this piece of code runs fine and has no problem.

    Set AgreementReqXml = New MSXML2.DOMDocument
    Set XmlHttp = New MSXML2.XmlHttp
    Set XmlHttpResp = New MSXML2.DOMDocument
    GetPath FpApp.ActiveWeb.RootFolder, ShippingLoc, False
    ShippingLoc = ShippingLoc & "/ups/agreementrequest.xml"
    FpApp.ActiveWeb.LocateFile(ShippingLoc).Edit
    Set MyDocObject = FpApp.ActivePageWindow.ActiveDocument
    ReqXmlStr = MyDocObject.DocumentHTML
    If Not AgreementReqXml.loadXML(ReqXmlStr) Then
        MsgBox "Unable to create request file", vbOKOnly + vbCritical,
"Shipping Error!"
        AgreementRequest = False
    End If

I didn't write the code, I'm trying to make sense out of it...but it surely
does not fail and that statement can't be right.



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.