Back to Devexpress

TreeListExtension.BindToXML(String, String) Method

aspnetmvc-devexpress-dot-web-dot-mvc-dot-treelistextension-dot-bindtoxml-x28-system-dot-string-system-dot-string-x29.md

latest1.9 KB
Original Source

TreeListExtension.BindToXML(String, String) Method

Binds the TreeList to the XML file specified by its name and an XPath expression.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public TreeListExtension BindToXML(
    string fileName,
    string xPath
)
vb
Public Function BindToXML(
    fileName As String,
    xPath As String
) As TreeListExtension

Parameters

NameTypeDescription
fileNameString

A string specifying the file name.

| | xPath | String |

A string specifying the XPath expression.

|

Returns

TypeDescription
TreeListExtension

An extension object.

|

Remarks

Note

The fileName parameter must refer to a physical file on the server, not a URL.

csharp
BindToXML(HttpContext.Current.Server.MapPath("~/App_Data/MyDataFile.xml"), "/Root/*")
vb
BindToXML(HttpContext.Current.Server.MapPath("~/App_Data/MyDataFile.xml"), "/Root/*")

See Also

Tree List

TreeListExtension Class

TreeListExtension Members

DevExpress.Web.Mvc Namespace