This method generates a list of files in a directory as XML and
returns the XML as a string.
Namespace: System.Xml.DirectoryAssembly: System.Xml.Directory (in System.Xml.Directory.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public string GetXmlString(
string strDirectory
) |
Visual Basic |
---|
Public Function GetXmlString (
strDirectory As String
) As String |
Visual C++ |
---|
public:
String^ GetXmlString(
String^ strDirectory
) |
F# |
---|
member GetXmlString :
strDirectory : string -> string
|
Return Value
Type:
StringA XML string with the directory file list
Examples
This sample shows how to call the
GetXmlString(String) method.
| Copy |
---|
class TestClass
{
static int Main()
{
string xmldir = @"c:\temp";
XmlDirectoryLister xmlString = new XmlDirectoryLister(true);
xmlString.GetXmlString(xmldir);
}
} |
See Also