CSharpTest.Net
XhtmlValidation Constructor(XhtmlDTDSpecification)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Html Namespace > XhtmlValidation Class > XhtmlValidation Constructor : XhtmlValidation Constructor(XhtmlDTDSpecification)

dtdRequired

Glossary Item Box

Creates a validator that requires documents to use the specified DTD

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal dtdRequired As XhtmlDTDSpecification _
)
C# 
public XhtmlValidation( 
   XhtmlDTDSpecification dtdRequired
)

Parameters

dtdRequired

Example

Library/Library.Test/TestXhtmlValid.cs

C#Copy Code
string doc = @"<html>
    <head><title>required</title></head>
    <body></body>
</html>
";

XhtmlValidation v = new XhtmlValidation(XhtmlDTDSpecification.None);
v.Validate(new StringReader(doc));
VB.NETCopy Code
Dim doc As String = "<html>" & vbCr & vbLf & "                <head><title>required</title></head>" & vbCr & vbLf & "                <body></body>" & vbCr & vbLf & "            </html>" & vbCr & vbLf & "            "

Dim v As New XhtmlValidation(XhtmlDTDSpecification.None)
v.Validate(New StringReader(doc))

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys