THtmlNode() > Overloaded operators |
Closes a new HTML node
- <cTagName>
The overloaded minus operator accepts a THtmlNode object as left operand, and a character string holding the HTML tag name of the THtmlNode as right operand. If the right operand is not the HTML tag name, a runtime error occurs. Otherwise, the HTML node is closed and the parent node is returned. For example:
oDoc := THtmlDocument():new() oNode := oDoc:body + "p" oNode:text := "This is " oNode := oNode + "i" oNode:text := "italic " oNode := oNode + "b" oNode:text := "and bold " oNode := oNode - "b" oNode := oNode - "i" oNode:text := "Text." ? oDoc:body:toString() ** output // <body> // <p>This is <i>italic <b>and bold </b></i>Text. // </body>
http://www.xHarbour.com