List Info

Thread: Accessing HTML element attributes from dom_nodeimpl.cpp




Accessing HTML element attributes from dom_nodeimpl.cpp
country flaguser name
United States
2007-05-22 05:50:39
Hi,
 
      Can any one suggest how to access HTML element attributes if we have corresponding DOM node pointer ? I tried following piece of code thru ddd debugger to access the element attributes of COL element; but unfortunately it failed. It is displaying some unreadable characters.
 
printf  "%s" , (this->enclosingBlockFlowOrTableElement())->getAttribute(this->id()).m_string.string().ascii()
 
printf  "%s" , (this->enclosingBlockFlowOrTableElement())->getAttribute(this->id()).m_string.string().latin1()
 
printf  "%s" , (this->enclosingBlockFlowOrTableElement())->getAttribute(this->id()).m_string.string().data()
 
Note:  In above statements, "this" is a COL Node pointer. (NodeImpl*). The function enclosingBlockFlowOrTableElement() returns ElementImpl* .
 
Thanks ...
 
Regards,
mdb
 
Re: Accessing HTML element attributes from dom_nodeimpl.cpp
country flaguser name
United States
2007-05-22 10:36:02
> Hi,
>
>       Can any one suggest how to access HTML element
attributes if we
> have corresponding DOM node pointer ? I tried following
piece of code
> thru ddd debugger to access the element attributes of
COL element; but
> unfortunately it failed. It is displaying some
unreadable characters.
>
> printf  "%s" ,
>
(this->enclosingBlockFlowOrTableElement())->getAttribu
te(this->id()).m_s
> tring.string().ascii()

You should be using ATTR_COL for parameter to getAttribute,
not ID_COL.
And if it's about your column post earlier, you probably
need to look at
it at the renderer level and not the DOM level.



[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )