Produce an XPath literal equal to the value if possible; if not, produce an XPath expression that will match the value. Note that this function will produce very long XPath expressions if a value contains a long run of double quotes.

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static string XPathLiteral(
	string value
)
Visual Basic
Public Shared Function XPathLiteral ( 
	value As String
) As String

Parameters

value
Type: System..::..String
The value to match.

Return Value

If the value contains only single or double quotes, an XPath literal equal to the value. If it contains both, an XPath expression, using concat(), that evaluates to the value.

Remarks

See Also