Skip to main content
Inspiring
March 8, 2011
Question

cffile can't read a br tag?

  • March 8, 2011
  • 1 reply
  • 876 views

I'm having cffile read an html file, and it works fine every time - unless there is a <br /> within a paragraph like this:

<p>By Bob Jones<br />Media Features</p>

Doesn't make sense, but if I take out the <br />, the file gets read just fine, every time. I should mention I'm also doing an xmlparse on the file, and I believe that's where the error is occuring.

    This topic has been closed for replies.

    1 reply

    Inspiring
    March 8, 2011

    Hang on.  Is the error happening on the CFFILE call or the xmlParse() call?  You kinda suggest both, but it can be only one.

    It always pays to post a replication case rather than describe the code, btw.  Knock together some simple, self-contained code that demonstrates the problem, and include the contents of a test file (again, as simple as possible).  This should have been the first of your own troubleshooting steps, btw, to isolate exactly what's causing the problem.

    --

    Adam

    Squiggy2Author
    Inspiring
    March 8, 2011

    The error states the following:

    An error occurred when performing a file operation read on file D:\inetpub\hellosandiego\editorial\life\backyard soirees_html\backyard soirees.html

    So it looks like it's happening when cffile attempts to read the html file. The html file is nothing fancy.

    There are <br /> tags all over the file, and they don't cause a problem. It's only when there it's within a paragraph, like this:

    <p>By Margraret Farber<br />Media Features</p>

    Squiggy2Author
    Inspiring
    March 8, 2011

    I found the problem, and it had nothing to do with the file. The naming convention of the file was the problem.