THtmlNode() > Html Attribute data xHarbour Developers Network  

oTHtmlNode:attr

Attributes of an HTML node.

Info

Data type:HDefault:NIL

Description

:attr is a generic Access/Assign variable returning all attributes of the THtmlNode as a Hash, or collecting one or more attributes upon assignment. The following code shows valid usage examples:

   ? oNode:htmlTagName                      // result: table

   // assigning a single attribute
   oNode:attr := 'border="0"'
   ? oNode:attrToString()                   // result: border="0"

   // assigning multiple attributes as character string
   oNode:attr := 'border=1 cellspacing=1'
   ? oNode:attrToString()                   // result: border="1" cellspacing="1"

   // assigning multiple attributes as Hash
   oNode:attr := { "border" => "0", "cellpadding" => "0" }
   ? oNode:attrToString()                   // result: border="0" cellpadding="0"


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe