Solved

XML Error -1072896682  What is wrong, never had an error in two months, not it does.

Posted on 2002-07-25
15
4,714 Views
Last Modified: 2013-12-24
I have an XML feed coming in from the outside to post information on my website:

http://secure.pharmacytimes.com/services/Recent_Courses.asp

Now out of nowhere after two months of getting the feed and displaying it properly, I get this error this morning... I saw it working perfectly fine as of last night and didn't touch anything.  Now this morning I am getting this error:

-- ErrorCode: -1072896682
ErrorReason: Invalid at the top level of the document.


Here is my code that displays the page:
-------------------------------------------------------

<CFHTTP method="GET" url="http://secure.pharmacytimes.com/services/Recent_Courses.asp?count=5" path="D:\InetPub\pharmacy\web" file="pt_ce_recent.xml" timeout="30" >

<cfobject action="CREATE" type="COM" class="Microsoft.XMLDOM" name="objXMLDOM">

<cfset XMLInputFile = "D:\InetPub\pharmacy\web\pt_ce_recent.xml">

<CFSET objXMLDOM.LOAD(XMLInputFile)>

<CFSET colBookList = objXMLDOM.getElementsByTagName("course")>
<!--- <TABLE BORDER="0" bgcolor="ffffff" width="100%"> --->
   <TR valign="top">
               <TD> </TD>
          <TD class="blurbs"><strong>Course Name</strong></TD>
          <TD class="blurbs" align="center"><strong>Course Units</strong></TD>
          <!--- <TD class="blurbs" align="center"><strong>Course Fee</strong></TD> --->
   </TR>
   <!--- Loop through the collection --->
   <CFLOOP COLLECTION="#colBookList#" Item="course">
       
           <CFSET CE_Title = course.SelectSingleNode("course_name")>
             <CFSET CE_URL = course.SelectSingleNode("course_url")>
           <CFSET CE_Units = course.SelectSingleNode("course_units")>
           <CFSET CE_Fee = course.SelectSingleNode("course_fee")>
           
           <CFOUTPUT>
              <TR valign="top">
           <TD width=7><IMG alt=* hspace=5 src="../images/imgArwrt.gif" vspace=5 border=0 width="7" height="7"></A></TD>
                 <TD class="blurbs"><a href="#CE_URL.Text#" target="_blank">#CE_Title.Text#</a></TD>
                 <TD class="blurbs" align="center">#CE_Units.Text#</TD>
                 <!--- <TD class="blurbs" align="center">#LSCurrencyFormat(CE_Fee.Text, "local")#</TD> --->
              </TR>
           </CFOUTPUT>
           
   </CFLOOP>
<!--- </TABLE> --->
<!---check if an error exists--->
<cfset XMLErr = objXMLDOM.parseError>
<cfoutput>
     <cfif XMLErr.errorcode NEQ 0>--
          ErrorCode:  #XMLErr.errorcode#<br>
          ErrorReason: #XMLErr.reason#
     </cfif>
</cfoutput>
0
Comment
Question by:jeffmace
  • 10
  • 4
15 Comments
 

Author Comment

by:jeffmace
ID: 7177773
Now I refreshed the page and its all better.  About an hour passed and it fixed itself..  Whys that??
0
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7177783
Thats a strange one alright.  Was the browser left open to any specific page that might be using sessions or application variables?
0
 

Author Comment

by:jeffmace
ID: 7177805
Now I refreshed the page and its all better.  About an hour passed and it fixed itself..  Whys that??
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:jeffmace
ID: 7177808
I tried this it on about 4 different computers.  Even two that were never to this page one time....  The problem existed for about 3 hours and I never corrected one line of code.. I have no idea on how it can fix itself or why it would error in the first place.

0
 

Author Comment

by:jeffmace
ID: 7177850
now one works and one doesn't.... this is killing me.. this is only like 20 minutes later
0
 
LVL 5

Expert Comment

by:Yog
ID: 7177911
verify if XML is in proper format, the reason tells the XML is in correct format which means you are not getting an XML file sometimes.

When you are getting the error, just see how the XML file looks and we will be able to correct from there.
0
 

Author Comment

by:jeffmace
ID: 7177927
when you say  not getting an xml file sometimes, do you mean that i am not getting the feed from the provider correctly or my code above is not producing the file correctly??
0
 
LVL 5

Expert Comment

by:Yog
ID: 7177963
not getting the feed from provider correcly , not loaded properly..
0
 
LVL 5

Expert Comment

by:Yog
ID: 7177972
coz the top line is   <?xml version="1.0" ?> and it might not be getting it as an XML file
0
 
LVL 5

Accepted Solution

by:
Yog earned 300 total points
ID: 7177980
wait a minute,

shouldn't you load the XML file instead of the path

<cfset XMLInputFile = "D:\InetPub\pharmacy\web\pt_ce_recent.xml">

i think it is just taking a string..not the xml file.

try
<cfoutput>
#XMLInputFile#
</cfoutput>

I think you should read the file

<cffile ...>
0
 

Author Comment

by:jeffmace
ID: 7178134
I am going to try this... I still don't understand though how this can work without problems for over two months and then all of a sudden two completely diffent feeds get affected overnight without anything being touched.
0
 

Author Comment

by:jeffmace
ID: 7178159
I am going to try this... I still don't understand though how this can work without problems for over two months and then all of a sudden two completely diffent feeds get affected overnight without anything being touched.
0
 

Author Comment

by:jeffmace
ID: 7178172
Also do you have any examples on how to read the file so that I can parse it and give it the look I created... Also does anyone maybe have a better Idea on how to handle the XML feed? Is the code I am using not the best way to do this?
0
 

Author Comment

by:jeffmace
ID: 7178295
Wow.. how stupid was this... It wasn't anything wrong on my end... My ISPs DNS servers weren't allowing this in... So they rebooted their DNS servers and everything is back to normal.. I know it had to be something strange for this to stop working so suddenly.

Thanks anyhow
Jeff
0
 

Author Comment

by:jeffmace
ID: 7180058
Thank you for your time.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Website Test Question 6 116
Asp.net plan security, reliable, stable 2 120
IIS url rewrite rule for web application 3 60
System Analysis 5 58
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question