Railo has a function called htmlParse() that will "clean up" html into
xhtml, but I /think/ it's only a Railo deal.

You can use something like JTidy, or Jericho HTML parser, etc., etc.,
if you're uncertain of what the input will be, and just need valid
output.

If you *know* that it will only be elements X, Y and Z that need
cleaning, you could do it yourself as part of pre-processing.

:Den

-- 
In almost everything, experience is more valuable than precept.
Marcus Fabius Quintilian

On Mon, Dec 20, 2010 at 7:54 PM, Michael Grant wrote:
>
> I have the following code pseudo code as an example:
>
> <table>
>
> <tr>
>
> <td>
> Some text here and br's that don't close. <br>
> <a href="url"><img src="url"></a></td>
>
> </tr>
>
> </table>
>
> I would like to parse this with xmlParse so that I can use dot notation to
> traverse it as a struct. However when I use xmlParse I get an error because
> the img and br tags aren't closed. The doc type is transitional.
>
> What's the best way to accomplish this? I'm using cf8 developer edition on
> my home machine.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340185
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to