I'm reading a XML (with XmlDocument) with some html inside of it. But sometimes i got a bad formatted XML something lie 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">
<head>
<meta http-equiv="refresh" content="0; url=<mocktag/>?<mock_tag=<moc
ktag/>&mocktag_2=<mockta
g/>
</head>
</html>
As you can see i have bad formatted tags and for that reason it causes my program to crash. So my question is any way to read the xml string correctly? Maybe transform this string into a one-line string?
content="0;to just before</head>. OP, how many different forms does themocktaggarble take? Is it regular enough to reliably search for?">missing before</head>. You should contact one who generates this xml.