Parameters
- filename
Library/Library.Test/TestXhtmlValid.cs
C# | Copy Code |
---|---|
string doc = @"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""> <html> <head><title>required</title></head> <body></body> </html> "; XhtmlValidation v = new XhtmlValidation(XhtmlDTDSpecification.XhtmlStrict_10); using (TempFile temp = new TempFile()) { temp.WriteAllText(doc); v.Validate(temp.TempPath); } |
VB.NET | Copy Code |
---|---|
Dim doc As String = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">" & vbCr & vbLf & " <html>" & vbCr & vbLf & " <head><title>required</title></head>" & vbCr & vbLf & " <body></body>" & vbCr & vbLf & " </html>" & vbCr & vbLf & " " Dim v As New XhtmlValidation(XhtmlDTDSpecification.XhtmlStrict_10) Using temp As New TempFile() temp.WriteAllText(doc) v.Validate(temp.TempPath) End Using |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
XhtmlValidation ClassXhtmlValidation Members
Overload List