HTML input to XHTML output?

Topics: Developer Forum, User Forum
May 5, 2008 at 11:01 PM
Edited May 6, 2008 at 8:51 PM
Hi,

I'm trying to take an HTML (or XHTML) page as input, do some node modifications (which I've got working brilliantly) and then save as XHTML. I'm falling down at the last hurdle, though- It's outputting a lot of gibberish in the saved XHTML (when saving as XML). For instance, this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

becomes:

<?xml version="1.0" encoding="utf-8"?><span><!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt -->
<html xml3alang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">

Am I missing something obvious?
May 6, 2008 at 8:50 PM
Just realised the library doesn't do XHTML at all. Still, I don't know why my XML is coming out as gibberish...