I need some help with a weird error.  

We have a page which does the following:

 

It generates a CF XML object.

It then uses the tostring() function to write it into a javascript
variable (jsstringformated of course)

Once the page reaches the browser the string is parsed back into an XML
document using var doc=new ActiveXObject("Microsoft.XMLDOM"); (if it is
IE)

Then the page continues merrily along doing client side things with this
XML.

 

The problem is this.  The code works for EVERYONE but one person on our
QA team who is testing.  IE parses the XML without error (it appears)
but the object it returns does have childNodes or anything else I would
expect for that matter.  Here is the weird thing.  When I tostring() the
XML document on the CF side it adds <?xml version="1.0"
encoding="UTF-8"?> to the beginning of the string.  When I remove that
tag from the xml BEFORE parsing it in JavaScript it works perfectly.  

 

Ok, in the time I have been typing this E-mail I just figured it out.  I
thought I would go ahead and post in case someone else ever needed this
answer.

 

I used COM Explorer http://www.4developers.com/com/index.htm to see what
version of what dll is registered for Microsoft.XMLDOM.  It was
C:\winnt\system32\msxml3.dll which is version 8.7.

My user's computer where it didn't work had a different version of the
dll registered msxml.dll version 8.0.7.  I registered the newer version
and their IE began parsing XML properly.

 

Sorry this turned out to be a bit off-topic.  At first I thought maybe I
was doing something wrong in CF when I used tostring to create the XML
string.  Turns out it was something more in the order of not having all
their windows updates installed.

 

If anyone is interested I can show you the JS which was breaking on her
computer.

 

P.S.  I also found out that Microsoft.XMLDOM doesn't necessarily throw
its errors.  You have to reference parseError.errorCode to see if there
were any parse errors.

 

~Brad



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280194
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to