Replying to myself, cos what's being said is quite important actually:

For all those who use XML via MSXML 4 on CF4/CF5:

If you use some of the methods of the DOM object in CFMX, errors are thrown.
One of these is the documentElement method:

root = xmlDoc.documentElement;

Which fails when you try to set it to something like this:

xmlDoc.documentElement = createElement("Tree");

The reason being that the returned Object doesn't appear to conform the the
COM specification (and therefore throws an error in Java). This isn't a
problem for the C++ based CF5 server, so my point is, that anyone upgrading
legacy applications from CF5 to CFMX containing the use of MSXML may have a
problem in upgrading.

If anyone can do this in CFMX, then it's something to do with my install
(which I don't think is the case as I can replicate it elsewhere).  I am
looking at telling a client that upgrading to CFMX could cost them a serious
amount of money considering the size of the website and the serious amount
of XML processing that goes on (and I didn't initially write the site, so
it's no skin off my nose).

Paul

-------------------------------------------
Paul Johnston
PJ Net Solutions Ltd
http://www.pjnetsolutions.com
[EMAIL PROTECTED]
+44 (0)7866 573013


> -----Original Message-----
> From: Paul Johnston [mailto:[EMAIL PROTECTED]] 
> Sent: 02 January 2003 16:50
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] COM object call from CFMX
> 
> 
> I am using MSXML 4 because I have to (legacy app, and I need 
> to get it working on my machine)...
> 
> I can create the object easily enough, but as soon as I try 
> to use it, or create a document element, then I get this message:
> 
> "An exception occurred when executing a Com method.  
> 
> The cause of this exception was that: 
> java.lang.NoSuchMethodException: There is no method called Item."
> 
> Code:
> 
> <cfset request.strXMLParser = "MSXML2.DOMDocument.4.0">
> 
> <!--- create an instance of the MSXML object --->
> <cfobject type="COM" name="xmlDoc" 
> class="#request.strXMLParser#" action="CREATE" context="INPROC">
> 
> <!--- add processing instruction --->
> <cfSet xmlPI = 
> xmlDoc.appendChild(xmlDoc.createProcessingInstruction("xml",
> "version='1.0'"))>
> 
> <cfscript>
>       newElem = xmldoc.createElement("Tree");
>       xmldoc.documentElement = newElem;
> </cfscript>
> 
> Error is thrown on the xmldoc.documentElement = newElem line 
> (in fact it doesn't matter what the line says, when I try to 
> write the documentElement property, it messes up).
> 
> Now, COM says that to use an object, it must contain an 
> "Item" method.  The application works on CF5, but not on 
> CFMX.  Has anyone else come across this before and is there a 
> simple workaround (apart from adding in an Item method, which 
> I really don't want to do!)
> 
> Anyone?
> 
> Paul
> 
> PS If it's MSXML 4 that's wrong... it's hardly a surprise is 
> it?  Who came up with COM anyway?
> 
> -------------------------------------------
> Paul Johnston
> PJ Net Solutions Ltd
> http://www.pjnetsolutions.com
> [EMAIL PROTECTED]
> +44 (0)7866 573013
> 
> 
> > -----Original Message-----
> > From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
> > Sent: 02 January 2003 11:36
> > To: [EMAIL PROTECTED]
> > Subject: RE: [ cf-dev ] WOT: removing iframe border using CSS
> > 
> > 
> > > Here are all the iframe attributes.
> > > 
> > > <iframe src="filename" width="400" height="400" marginwidth="0"
> > > marginheight="0" align="left" frameborder="0"> </iframe>
> > > 
> > > If a style of
> > > border : none;
> > > 
> > > doesn't work then that css attribute doesn't affect iframe border.
> > 
> > Cule, thanks Russ. Yeah, looks like frameborder is going to
> > have to be it, although I hate using attributes where CSS 
> should work.
> > 
> > And I realised after posting the follow-up that I'd lied
> > (well, made a mistake); style="border: none;" works for 
> > Netscape in the iframe tag, not in the body tag.
> > 
> > 
> > --
> > Aidan Whitehall <[EMAIL PROTECTED]>
> > Macromedia ColdFusion Developer
> > Fairbanks Environmental Ltd  +44 (0)1695 51775
> > 
> > ______________________________________________________________
> > __________
> > This e-mail has been scanned for all viruses by Star
> > Internet. The service is powered by MessageLabs. For more 
> > information on a proactive anti-virus service working around 
> > the clock, around the globe, visit: http://www.star.net.uk 
> > ______________________________________________________________
> > __________
> > 
> > --
> > ** Archive: 
> http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/
> > 
> 
> > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED] For human help, e-mail: 
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] For human help, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> 




--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to