Code? -e
-----Original Message----- From: Aminova, Elena [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 1:09 PM To: CF-Talk Subject: RE: Document root element is missing... Another issue rises I have added the cffile and it gets rid of the "Document root element is missing." finally, but it doesn't make sense to me a little, why first reading the file and then parsing it would solve this issue. But thank you so much everyone for your help and input! Another issue rises though, on some XML files, when I run my script and insert into the DB the values from the XML file, I get this error: Error Executing Database Query. Invalid data for CFSQLTYPE CF_SQL_INTEGER. The above error happens only on some XML files, and all are in identical format, all the files run smoothly on the other server, the CF7 server, but gives this here. Any suggestions? -----Original Message----- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 12:22 PM To: CF-Talk Subject: RE: Document root element is missing. So are you saying even after reading with cffile you cant just xmlparse(myxml)? Emmet -----Original Message----- From: Aminova, Elena [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 12:12 PM To: CF-Talk Subject: RE: Document root element is missing. I have 100s of XML files, if not more to go through, it would be impossible to go through each one of them and strip off everything before the root element... When I do the <cffile action="read" file="#filename#" variable="myxml">, it reads the file, but I need it parsed. Any other suggestions? -----Original Message----- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 11:45 AM To: CF-Talk Subject: RE: Document root element is missing. Did you open the file in hexedit like I suggested. I can almost guarantee the presence of a BOM. If you don't have a hex editor you can use a simple executable from http://www-physics.mps.ohio-state.edu/~prewett/hexedit/ to confirm the BOM is in the file. If that's the case, your only options are to save the file then read with cffile or to strip off everything before the root element. You don't need the xml declaration for parsing purposes. If you did for some reason then you could always strip out your first < and everything before it, then add it back. If your unfamiliar with hex and want me to confirm it, send over the file. Emmet -----Original Message----- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 11:33 AM To: CF-Talk Subject: RE: Document root element is missing. Check to see if there is debugging on. If you are retrieving the file through cfhttp and debugging is ON for the 127.0.0.1 address you will end up with malformed xml. Add <cfsetting showdebugoutput="NO"> above your output and see. -----Original Message----- From: Aminova, Elena [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 9:10 AM To: CF-Talk Subject: RE: Document root element is missing. Well, I am using CFMX on the server that throws an error and CF7 on the one that doesn't throw an error. Can that cause this error? Why would it? -----Original Message----- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: Monday, June 06, 2005 9:59 AM To: CF-Talk Subject: Re: Document root element is missing. you are using MX 7? Adam H On 6/6/05, Elena Aminova <[EMAIL PROTECTED]> wrote: > I am getting the "Document root element is missing." error when i am trying to parse an xml file on this line: > <cfset kitFile = XmlParse(xmlfile)> > > This problem only occurs on the live server, and NOT on the > development server. I have tried debugging and its not the permissions > issue, because i can read the XML files easily when i give it an exact > filename and then read it <cffile action="read" file="#filename#" > variable="myxml"> > > Yet, when i try to run the script which needs to parse the xmlfile and extract info from it, i am getting the "Document root element is missing." > > Any advise would be appreaciated > Thanks > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208720 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54