Flamingo.XPath.innerHTML()

The innerHTML() method is used to display inner HTML content of the node found by XPath.

Syntax

Flamingo.XPath.innerHTML(xPath, parent)

Parameters

Parameter Type Description
xPath String XPath expression.
parent Node object Context node against which specified XPath will be executed.

Return Value

Type Description
String Inner HTML of the node found by XPath.

Example

The example below demonstrates how to display HTML code available inside the BODY element.

Source HTML code available on original desktop site page:

<html>
 <body>
   <h1>Hello World!</h1>
 </body>
</html>

You need to add the following code to your template to display HTML code available inside the BODY element:

<!--{= Flamingo.XPath.innerHTML('//body') }-->

The result will look like:

<h1>Hello World!</h1>

See also