geissingert
2007-03-20 14:30:42 UTC
HtmlElement elem = webBrowser1.Document.GetElementById("PageHtml");
string pageHtml = elem.InnerHtml;
I am using the following to read the innerhtml from a web page that I
created. When I read the information from the innerhtml the attributes do
not contain quotes:
if should be id="Text1" but what is returned is id=Text1. Is there any way
to set a property or value in the web page to return the attributes with the
quotes?
I have added the DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" to the top of the html
page and the following xmlns="http://www.w3.org/1999/xhtml" to the html tag.
What I am trying to do is keep the content in xhtml format.
Any help would be greatly appreciated.
string pageHtml = elem.InnerHtml;
I am using the following to read the innerhtml from a web page that I
created. When I read the information from the innerhtml the attributes do
not contain quotes:
if should be id="Text1" but what is returned is id=Text1. Is there any way
to set a property or value in the web page to return the attributes with the
quotes?
I have added the DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" to the top of the html
page and the following xmlns="http://www.w3.org/1999/xhtml" to the html tag.
What I am trying to do is keep the content in xhtml format.
Any help would be greatly appreciated.