BuildComponentUtilitiesEvalXPathExpr(IXPathNavigable, XPathExpression, String) Method
This is used to get the string result from evaluating an XPath expression against the given document
and a context created from a set of key/value pairs.
Namespace: Sandcastle.Core.BuildAssemblerAssembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2024.12.21.0
public static string EvalXPathExpr(
this IXPathNavigable document,
XPathExpression expression,
params string[] keyValuePairs
)
<ExtensionAttribute>
Public Shared Function EvalXPathExpr (
document As IXPathNavigable,
expression As XPathExpression,
ParamArray keyValuePairs As String()
) As String
public:
[ExtensionAttribute]
static String^ EvalXPathExpr(
IXPathNavigable^ document,
XPathExpression^ expression,
... array<String^>^ keyValuePairs
)
[<ExtensionAttribute>]
static member EvalXPathExpr :
document : IXPathNavigable *
expression : XPathExpression *
keyValuePairs : string[] -> string
- document IXPathNavigable
- The document to use
- expression XPathExpression
- The XPath expression to evaluate
- keyValuePairs String
- A set of key/value pairs to use when creating the context
StringThe evaluated expression resultIn Visual Basic and C#, you can call this method as an instance method on any object of type
IXPathNavigable. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
string result = document.EvalXPathExpr("concat($key, '.htm')", "key", "filename");
ArgumentException | This is thrown if the keyValuePairs
parameter contains an odd number of parameters. |