There is a difference between the ACF10 toString( value ) output and Lucee toString( value ) output when the value is XML. I've attached a simple HTML document that is read using xmlParse( ). I've also attached 2 additional files, that reprersent the output from ACF10 and Lucee (FINAL 4.5.2.007).
Suggestions for resolving this?
Images are missing...
Lucee's XML parsing just doesn't seem to work in this situation.
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/3d62876e-b162-4108-b339-09d1644fe528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Before.html>
<AfterACF10.html>
<AfterLucee.html>
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/3d62876e-b162-4108-b339-09d1644fe528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Before.html>
<AfterACF10.html>
<AfterLucee.html>
I will look at the htmlParse function, but the issue is really with
the toString(), whereby the xml document object is rewritten as a
string. Null elements, like <br> need to be closed properly, as in
<br />.
On Saturday, August 15, 2015 at 11:15:06 AM UTC-5, Mark Drew wrote:
Instead of doing xmlParse lucee should have an htmlParse function
(can't check right now as on phone) try that.
Mark Drew
- Sent by typing with my thumbs.
On 15 Aug 2015, at 00:10, Marilou Landes <marilou...@gmail.com
<javascript:>> wrote:
There is a difference between the ACF10 toString( value ) output
and Lucee toString( value ) output when the value is XML. I've
attached a simple HTML document that is read using xmlParse( ).
I've also attached 2 additional files, that reprersent the output
from ACF10 and Lucee (FINAL 4.5.2.007).
Lucee output seems to be missing the first line (<?xml ...) and
has not properly closed the META, LINK, BR and IMG tags.
Suggestions for resolving this?
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany -
Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the
Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/3d62876e-b162-4108-b339-09d1644fe528%40googlegroups.com
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
<Before.html>
<AfterACF10.html>
<AfterLucee.html>
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get
your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google
Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com
<mailto:lucee+un...@googlegroups.com>.
To post to this group, send email to lu...@googlegroups.com
<mailto:lu...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/f649920d-7f70-4ee4-9ff5-a5fd115f83f5%40googlegroups.com
<https://groups.google.com/d/msgid/lucee/f649920d-7f70-4ee4-9ff5-a5fd115f83f5%40googlegroups.com?utm_medium=email&utm_source=footer>.
16 August 2015 03:55
I will look at the htmlParse function, but the issue is really with the toString(), whereby the xml document object is rewritten as a string. Null elements, like <br> need to be closed properly, as in <br />.--
On Saturday, August 15, 2015 at 11:15:06 AM UTC-5, Mark Drew wrote:
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/f649920d-7f70-4ee4-9ff5-a5fd115f83f5%40googlegroups.com.
15 August 2015 17:14
Instead of doing xmlParse lucee should have an htmlParse function (can't check right now as on phone) try that.
Mark Drew- Sent by typing with my thumbs.There is a difference between the ACF10 toString( value ) output and Lucee toString( value ) output when the value is XML. I've attached a simple HTML document that is read using xmlParse( ). I've also attached 2 additional files, that reprersent the output from ACF10 and Lucee (FINAL 4.5.2.007).--
Lucee output seems to be missing the first line (<?xml ...) and has not properly closed the META, LINK, BR and IMG tags.
Suggestions for resolving this?
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/3d62876e-b162-4108-b339-09d1644fe528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Before.html><AfterACF10.html><AfterLucee.html>
15 August 2015 00:10
16 August 2015 10:25
You are somewhat missing the point, Mark. The source document is XML. The dialect of mark-up the file contains might be XHTML, but it's well-formed and it is valid XML. Look at it.So all the operation is doing is taking some XML, converting it to a Lucee XML object, then turning it back into XML again.And Lucee is ballsing up the last step. That is the issue here: the toString() function is not emitting valid XML. The problem does not lie with the initial parsing.
On Sunday, 16 August 2015 10:04:14 UTC+1, Mark Drew wrote:
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/29911346-c952-44f2-b41b-63eaadef30c7%40googlegroups.com.
16 August 2015 10:04
I did the following example, using your test files and I got the output that you might expect
<cfscript>
xmlHTML = xmlParse(FileRead("Before.html"));
htmlHtml = htmlParse(FileRead("Before.html"));
dump(toString(xmlHTML));
dump(toString(htmlHtml));
</cfscript>
The output of xmlParse is:
<html lang="en"> <head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><META content="text/html; charset=UTF-8" http-equiv="Content-Type"> <title>XMLParse and toString Test</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <h1 data-eid="1" data-pid="56" tabindex="0">XMLParse and toString Test</h1> <img alt="someFile" src="someFile.jpg"> <br> </body> </html>
Maintaining the actual format of HTML even though you used the xmlParse, in an (odd?) way I can see why it would do this.
The output of the htmlParsing gives you a more XML like output:
<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><title>XMLParse and toString Test</title><link href="style.css" rel="stylesheet" type="text/css"/></head><body> <h1 data-eid="1" data-pid="56" tabindex="0">XMLParse and toString Test</h1> <img alt="someFile" src="someFile.jpg"/> <br clear="none"/> </body></html>
Which I think is more akin to what you were expecting (closing the br and img tags)
Hope that helps
Regards
Mark Drew
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body> <div> <h1>XMLParse and toString Test</h1> <img src="http://someFile.jpg" alt="someFile"> <br> </div> </body></html> That is not valid XML. |
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/29911346-c952-44f2-b41b-63eaadef30c7%40googlegroups.com.
I looked at it. I see this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><META http-equiv="Content-Type" content="text/html; <div> <h1>XMLParse and toString Test</h1> <img src="http://someFile.jpg" alt="someFile"> <br> </div> </body></html>
That is not valid XML.
--Shu Ha Ri: Agile/Lean Product Development blog - http://www.bifrost.com.au/Agile in 140 characters or less - https://twitter.com/James_R_HolmesWhatever LinkedIn is for - http://www.linkedin.com/in/jrholmes
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAEhA4MrPGgETe0GhvuDuCZejse6T9J8bkN%3DQktw1R_0uDTp42w%40mail.gmail.com.
16 August 2015 10:25
You are somewhat missing the point, Mark. The source document is XML. The dialect of mark-up the file contains might be XHTML, but it's well-formed and it is valid XML. Look at it.--So all the operation is doing is taking some XML, converting it to a Lucee XML object, then turning it back into XML again.And Lucee is ballsing up the last step. That is the issue here: the toString() function is not emitting valid XML. The problem does not lie with the initial parsing.
On Sunday, 16 August 2015 10:04:14 UTC+1, Mark Drew wrote:
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/29911346-c952-44f2-b41b-63eaadef30c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
16 August 2015 10:04
I did the following example, using your test files and I got the output that you might expect
<cfscript>
xmlHTML = xmlParse(FileRead("Before.html"));
htmlHtml = htmlParse(FileRead("Before.html"));
dump(toString(xmlHTML));
dump(toString(htmlHtml));
</cfscript>
The output of xmlParse is:
<html lang="en"> <head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><META content="text/html; charset=UTF-8" http-equiv="Content-Type"> <title>XMLParse and toString Test</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <h1 data-eid="1" data-pid="56" tabindex="0">XMLParse and toString Test</h1> <img alt="someFile" src="someFile.jpg"> <br> </body> </html>
Maintaining the actual format of HTML even though you used the xmlParse, in an (odd?) way I can see why it would do this.
The output of the htmlParsing gives you a more XML like output:
<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><title>XMLParse and toString Test</title><link href="style.css" rel="stylesheet" type="text/css"/></head><body> <h1 data-eid="1" data-pid="56" tabindex="0">XMLParse and toString Test</h1> <img alt="someFile" src="someFile.jpg"/> <br clear="none"/> </body></html>
Which I think is more akin to what you were expecting (closing the br and img tags)
Hope that helps
Regards
Mark Drew
16 August 2015 03:55
I will look at the htmlParse function, but the issue is really with the toString(), whereby the xml document object is rewritten as a string. Null elements, like <br> need to be closed properly, as in <br />.
On Saturday, August 15, 2015 at 11:15:06 AM UTC-5, Mark Drew wrote:
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/f649920d-7f70-4ee4-9ff5-a5fd115f83f5%40googlegroups.com.
15 August 2015 17:14
Instead of doing xmlParse lucee should have an htmlParse function (can't check right now as on phone) try that.
Mark Drew- Sent by typing with my thumbs.
There is a difference between the ACF10 toString( value ) output and Lucee toString( value ) output when the value is XML. I've attached a simple HTML document that is read using xmlParse( ). I've also attached 2 additional files, that reprersent the output from ACF10 and Lucee (FINAL 4.5.2.007).
Lucee output seems to be missing the first line (<?xml ...) and has not properly closed the META, LINK, BR and IMG tags.
Suggestions for resolving this?
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/3d62876e-b162-4108-b339-09d1644fe528%40googlegroups.com.
<Before.html><AfterACF10.html><AfterLucee.html>
The source is HTML in Before.html might have closing tags but it is NOT marked as proper XHTML (it's marked as HTML5) so it gets processed by (I am guessing here TagSoup? ) as a non XML variant right?
I looked at it. I see this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body> <div> <h1>XMLParse and toString Test</h1> <img src="http://someFile.jpg" alt="someFile"> <br> </div> </body></html>
That is not valid XML.
The source is HTML in Before.html might have closing tags but it is NOT marked as proper XHTML (it's marked as HTML5) so it gets processed by (I am guessing here TagSoup? ) as a non XML variant right?
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/442fbc9e-cf2b-4f3f-b997-c77395318ec3%40googlegroups.com.
That's the source of before.html according to my machine. Are you seeing something different?
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d5e97f1d-ce69-4b02-b4ad-00fbe314b402%40googlegroups.com.
That's the source of before.html according to my machine. Are you seeing something different?
<!DOCTYPE html>
<html lang="en">
<head><META http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>XMLParse and toString Test</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1 data-eid="1" data-pid="56" tabindex="0">XMLParse and toString Test</h1>
<img src="someFile.jpg" alt="someFile" />
<br />
</body>
</html>