SrgsDocument Constructor (XmlReader)
Initializes a new instance of the SrgsDocument class specifying the grammar to use when creating the document.
Namespace: Microsoft.Speech.Recognition.SrgsGrammar
Assembly: Microsoft.Speech (in microsoft.speech.dll)
Syntax
'Declaration
Public Sub New ( _
srgsGrammar As XmlReader _
)
public SrgsDocument (
XmlReader srgsGrammar
)
public:
SrgsDocument (
XmlReader^ srgsGrammar
)
public SrgsDocument (
XmlReader srgsGrammar
)
public function SrgsDocument (
srgsGrammar : XmlReader
)
Parameters
- srgsGrammar
The System.Xml.XmlReader that was created with the SrgsDocument XML instance.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | srgsGrammar is null. |
Example
string srgsDocumentFile = Path.Combine(Path.GetTempPath(), "srgsDocumentFile.xml");
SrgsDocument document = null;
if (File.Exists(srgsDocumentFile))
{
XmlReader reader = XmlReader.Create(srgsDocumentFile);
document = new SrgsDocument(reader);
reader.Close();
}
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
See Also
Reference
SrgsDocument Class
SrgsDocument Members
Microsoft.Speech.Recognition.SrgsGrammar Namespace