Re: Document root element is missing.

2007-04-18 Thread Kris Jones
Sounds kind of obvious, but is the document someRss.xml well-formed?
It must have a single root element to be valid.

This block is invalid because there is no single root element:

record
columnsome value A/column
columnsome value B/column
/record
record
columnsome value C/column
columnsome value D/column
columnsome value E/column
/record
---
This block is valid because there is a single enclosing root element:
---
data
record
columnsome value A/column
columnsome value B/column
/record
record
columnsome value C/column
columnsome value D/column
columnsome value E/column
/record
/data
---

 ?xml version=1.0 encoding=UTF-8?
 ?xml-stylesheet type=text/xsl href=news_rss.xsl?

 The above code is at the top of an XML feed that I am trying to process. I 
 want to remove it, otherwise I get the following error.

 Document root element is missing.
 Document root element is missing.

 My code looks like this.
 cfhttpurl=http://www.somewebsite.com/rss/someRss.xml;method=get
 cfset myXMLDoc=XMLParse(CFHTTP.FileContent)


~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

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


Re: Document root element is missing.

2007-04-18 Thread Dwayne Cole
Maybe I should clarify.

When I fetch the XML file with
cfhttpurl=http://www.somewebsite.com/rss/someRss.xml;method=get

the resulting CFHTTP.FileContent variables contains the following lines

?xml version=1.0 encoding=UTF-8?
?xml-stylesheet type=text/xsl href=news_rss.xsl?

I need some code to parse / remove the above lines from the chttp.fileconent 
variable.  Once I have removed the above lines the XML would then be well 
formed.




-- Original Message --
From: Kris Jones [EMAIL PROTECTED]
Reply-To: cf-talk@houseoffusion.com
Date:  Wed, 18 Apr 2007 14:46:29 -0400


Sounds kind of obvious, but is the document someRss.xml well-formed?
It must have a single root element to be valid.

This block is invalid because there is no single root element:

record
   columnsome value A/column
   columnsome value B/column
/record
record
   columnsome value C/column
   columnsome value D/column
   columnsome value E/column
/record
---
This block is valid because there is a single enclosing root element:
---
data
   record
   columnsome value A/column
   columnsome value B/column
   /record
   record
   columnsome value C/column
   columnsome value D/column
   columnsome value E/column
   /record
/data
---

 ?xml version=1.0 encoding=UTF-8?
 ?xml-stylesheet type=text/xsl href=news_rss.xsl?

 The above code is at the top of an XML feed that I am trying to process. I 
 want to remove it, otherwise I get the following error.

 Document root element is missing.
 Document root element is missing.

 My code looks like this.
 cfhttpurl=http://www.somewebsite.com/rss/someRss.xml;method=get
 cfset myXMLDoc=XMLParse(CFHTTP.FileContent)




~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

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


RE: Document root element is missing.

2005-06-06 Thread David Manriquez
The XMl isn't well formed

David Manriquez Desarrollador
[EMAIL PROTECTED] 
(+56-2) 43 00 155



-Mensaje original-
De: Elena Aminova [mailto:[EMAIL PROTECTED] 
Enviado el: Lunes, 06 de Junio de 2005 9:23
Para: CF-Talk
Asunto: Document root element is missing.

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:208671
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


RE: Document root element is missing.

2005-06-06 Thread Aminova, Elena
That couldnt be true, because when i do the same thing on an another
server, it works flawlessly, without any bumps on the road. 
I don't know what could be causing this. I have cleaned up the XML file
to the simplest XML for testing purposes, and any well-formed XML file
throws this error.  

-Original Message-
From: David Manriquez [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 06, 2005 9:45 AM
To: CF-Talk
Subject: RE: Document root element is missing.

The XMl isn't well formed

David Manriquez Desarrollador
[EMAIL PROTECTED]
(+56-2) 43 00 155



-Mensaje original-
De: Elena Aminova [mailto:[EMAIL PROTECTED]
Enviado el: Lunes, 06 de Junio de 2005 9:23
Para: CF-Talk
Asunto: Document root element is missing.

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:208673
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing.

2005-06-06 Thread COLLIE David
Outside shot, try wrapping in cfoutput (anywhere you can, especially if
using cfxml)... Caught me a few times when enablecfoutputonly is set to
yes so you end up trying to parse an empty string

-- 
dc



~|
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:208676
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


Re: Document root element is missing.

2005-06-06 Thread Adam Haskell
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
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208678
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


RE: Document root element is missing.

2005-06-06 Thread Aminova, Elena
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
 
 



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208679
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing.

2005-06-06 Thread Emmet McGovern
Is the XML doc coming from you or another source?  If it's a UTF-8 doc with
a byte order marker (BOM) in front of the xml declaration it will fail. I'm
not sure about CFMX7 but I'm assuming it was a bug in xmlparse 6  6.1 since
technically a BOM can exist and should still validate. 

Open the xml doc in a hex editor.  If there's a BOM you'll see a ... or EF
BB BF in front of the first declaration. If it's not UTF-8 the BOM will be
different but will still be represented by 3 garbage bytes of data.

The simplest way to overcome it is to just strip away everything before your
root element.  You'll need to kill the declaration in the process since CF
won't see the BOM as whitespace.

Ex. 
cfset begin = Find(rss version=2.0,CFHTTP.FileContent)
cfscript
begin = begin -1;
xml = RemoveChars(CFHTTP.FileContent,1,begin);
xml = XMLParse(xml);
/cfscript
cfdump var=#xml#

Maybe this helps.

Emmet

-Original Message-
From: Aminova, Elena [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 06, 2005 10: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
 
 





~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208681
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


Re: Document root element is missing.

2005-06-06 Thread Adam Haskell
MX 7 can take a file name as an arguement MX 6 can not. So yes that
would be the issue :)

Adam H 

On 6/6/05, Aminova, Elena [EMAIL PROTECTED] wrote:
 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
 
 
 
 
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208682
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


RE: Document root element is missing.

2005-06-06 Thread Aminova, Elena
Is there a way to fix this without upgarding that server to CF7? If that
is the issue... 

-Original Message-
From: Adam Haskell [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 06, 2005 10:36 AM
To: CF-Talk
Subject: Re: Document root element is missing.

MX 7 can take a file name as an arguement MX 6 can not. So yes that
would be the issue :)

Adam H 

On 6/6/05, Aminova, Elena [EMAIL PROTECTED] wrote:
 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:208686
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


RE: Document root element is missing.

2005-06-06 Thread S . Isaac Dealey
Read the file with cffile then pass the variable returned to
XMLParse.

 Is there a way to fix this without upgarding that server
 to CF7? If that
 is the issue...

 -Original Message-
 From: Adam Haskell [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 06, 2005 10:36 AM
 To: CF-Talk
 Subject: Re: Document root element is missing.

 MX 7 can take a file name as an arguement MX 6 can not. So
 yes that
 would be the issue :)

 Adam H


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208690
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


RE: Document root element is missing.

2005-06-06 Thread Mark A Kruger
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:208693
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


RE: Document root element is missing.

2005-06-06 Thread Emmet McGovern
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:208696
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Document root element is missing.

2005-06-06 Thread Adam Haskell
Sorry I was busy with a new report so my response was not very helpful :(

Like Issac said though  just use cffile and parse the contents. In MX
6 XMLparse only parsed a string (which it assumed was a well formed
XML document, if it wasn't it would spot an error back at you).  In MX
7 they added the ability for you to pass a string which contained the
path to a file which was a well formed XML document.

Testing envirmonments should not be so drastically different. Your
staging and production environments should be as identical as
possible. MX 6 and MX 7 are enough different that you should not be
testing on one and deploying on the other...this is a great example of
why this is true...load testing as well...things that run well on MX 7
may not necasserily run as nicely in MX 6.

Adam H 

On 6/6/05, S. Isaac Dealey [EMAIL PROTECTED] wrote:
 Read the file with cffile then pass the variable returned to
 XMLParse.

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208699
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing.

2005-06-06 Thread Aminova, Elena
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:208702
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing.

2005-06-06 Thread James Holmes
 cffile action=read file=#filename# variable=myxml
 cfset MyXMLOBJECT = XMLParse(myxml)

-Original Message-
From: Aminova, Elena [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 7 June 2005 12:12 
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?

~|
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:208705
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


Re: Document root element is missing.

2005-06-06 Thread Adam Haskell
after cffile do cfset myXML=xmlParse(myxml) 
Thats all


Adam H 

On 6/6/05, Aminova, Elena [EMAIL PROTECTED] wrote:
 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?

~|
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:208704
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing.

2005-06-06 Thread S . Isaac Dealey
If you know what the root element is, you can write a CF script to
strip everything else using a regular expression reasonably easily...
maybe even without knowing what the root element is...

cfloop query=getFile
  cffile action=read file=#getFile.path# variable=xml
  cfset xml =
rereplacenocase(trim(xml),^.*(([[:alpha:]]+).*/\2).*$,\1)
  cffile action=write file=#getFile.path# output=#xml#
/cfloop

Or just put a similar regular expression around the content of the
file before you parse it.

 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?


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208709
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing.

2005-06-06 Thread Emmet McGovern
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













~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208710
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=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Document root element is missing... Another issue rises

2005-06-06 Thread Aminova, Elena
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















~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208717
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


RE: Document root element is missing... Another issue rises

2005-06-06 Thread Emmet McGovern
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


RE: Document root element is missing... Another issue rises

2005-06-06 Thread S . Isaac Dealey
 -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!

Well... because

element.../element

is valid xml... and

C:\Inetpub\wwwroot\mydocument.xml

is not valid xml...

CFMX 7 just automates the file-read if you pass a file path to it --
it doesn't actually _parse_ the file path... it parses the file
contents, which is what cffile reads.


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~|
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:208740
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