SrgsDocument Constructor (String)
Initializes a new instance of the SrgsDocument class specifying the location of the XML document that is used to fill in the SrgsDocument instance.
Namespace: Microsoft.Speech.Recognition.SrgsGrammar
Assembly: Microsoft.Speech (in microsoft.speech.dll)
Syntax
'Declaration
Public Sub New ( _
path As String _
)
public SrgsDocument (
string path
)
public:
SrgsDocument (
String^ path
)
public SrgsDocument (
String path
)
public function SrgsDocument (
path : String
)
Parameters
- path
The location of the SRGS XML file.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | path is null. |
ArgumentException | path is an empty string. |
Example
string srgsDocumentFile = Path.Combine(Path.GetTempPath(), "srgsDocumentFile.xml");
SrgsDocument document = null;
if (File.Exists(srgsDocumentFile))
document = new SrgsDocument(srgsDocumentFile);
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