Interface IXPathExpression

Interface IXPathExpression

Numele spaţiului: Aspose.Html.Dom.XPath Asamblare: Aspose.HTML.dll (25.4.0)

Interfața ‘XPathExpression’ reprezintă o expresie parsedă și rezolvată XPath.

[DOMName("XPathExpression")]
[DOMObject]
[ComVisible(true)]
public interface IXPathExpression

Methods

Evaluate(Node, XPathResultType, obiect)

Evaluează această expresie XPath și returnează un rezultat.

[DOMName("evaluate")]
IXPathResult Evaluate(Node contextNode, XPathResultType type, object result)

Parameters

contextNode Node

‘context’ este nodul de context pentru evaluarea acestei expresii XPath.Dacă Aspose.Html.Dom.XPath.IXPathEvaluator a fost obținut prin castarea Aspose.Html.Dom.Document atunci acest lucru trebuie să fie deținut de același document și trebuie să fie un Aspose.Html.Dom.Dom.Element, Aspose.Html.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.Dom.D

type XPathResultType

Dacă este specificat un anumit tip, atunci rezultatul va fi forțat să restituie tipul specific bazat pe conversii XPath și eșuează dacă forța dorită nu este posibilă.

result object

“Rezultat” specifică un anumit obiect de rezultat care poate fi reutilizat și returnat prin această metodă. Dacă acest lucru este specificat ca “zero” sau implementarea nu reutilizează rezultatul specificat, un nou obiect de rezultat va fi construit și returnat. Pentru rezultatele XPath 1.0, acest obiect va fi tip Aspose.Html.Dom.XPath.IXPathResult.

Returns

IXPathResult

Rezultatul evaluării expresiei XPath. pentru rezultatele XPath 1.0, acest obiect va fide tip Aspose.Html.Dom.XPath.IXPathResult.

Exceptions

DOMException

TYPE_ERR: Creată dacă rezultatul nu poate fi convertit pentru a întoarce tipul specificat.

DOMException

WRONG_DOCUMENT_ERR: nodul este dintr-un document care nu este susținut deAspose.Html.Dom.XPath.IXPathEvaluator care a creat acest Aspose.Html.Dom.XPath.IXPathExpression.

DOMException

NOT_SUPPORTED_ERR: Nodul nu este un tip permis ca un nod de context XPathsau tipul de cerere nu este permis de acest Aspose.Html.Dom.XPath.IXPathExpression.

 Română