This project has moved. For the latest updates, please go here.

Getting Style Attributes

Topics: Developer Forum
Nov 3, 2009 at 10:12 AM

First of all

this HAP is very useful for us to parse HTML instead of using javascript.

Im just facing one issue i can't able to retrive style attributes like border-top,top,height

For Example

I have a <span  style="Border-TOP:12Px;Border-BOTTTOM:80px;TOP:490px;HEIGHT:400px"/>

How can i retreive the Border-Style etc using HAP any idea

May 28, 2012 at 12:18 AM

I'm also facing the same issue.

Jul 23, 2012 at 11:39 PM

Simple soution is to:

1. find the element

2. find the style attribute

3. do a string split of the attribute value on ';' (semicolon) -> array

4. iterate the array, splitting each item on ':' (colon)

That will give you access to each style attribute and its value as strings.