I have the following TagOpen
[TagOpen a
[(href,/launchWebForward.do?resourceId=4policy=0returnTo=%2FshowWebForwards.do)]]
I would like to get the attribute resourceId=4 from that. My
understanding is that fromAttrib is the right thing to use. But
I'm having difficulty understanding the type
On Tuesday 02 November 2010 22:17:48, Michael Litchard wrote:
I have the following TagOpen
[TagOpen a
[(href,/launchWebForward.do?resourceId=4policy=0returnTo=%2FshowWeb
Forwards.do)]]
I would like to get the attribute resourceId=4 from that. My
understanding is that fromAttrib is the right
Daniel,
Thank you for your reply. I'm still confused.
When I see a code sample like this
main = do
posts - liftM parseTags (readFile posts.xml)
print $ head $ map (fromAttrib Id) $
filter (~== (row OwnerUserId= ++ userid ++ ))
posts
I have no idea
On 2 November 2010 22:40, Michael Litchard mich...@schmong.org wrote:
fromAttrib :: (Show str, Eq str, StringLike str) = str - Tag str - str
seems to say fromAttrib takes two parameters (I know it doesn't
literally take two), one str (with the constraints in parenthesis to
the left) and one
Excerpts from Michael Litchard's message of Tue Nov 02 22:40:27 +0100 2010:
Daniel,
Thank you for your reply. I'm still confused.
When I see a code sample like this
main = do
posts - liftM parseTags (readFile posts.xml)
print $ head $ map (fromAttrib Id) $
Ah thank you. I can go ahead and figure out how to parse that string.
Using a regex is tempting but I have a feeling I can get something
more maintainable if I use another approach.
On Tue, Nov 2, 2010 at 2:52 PM, Daniel Schoepe
daniel.scho...@googlemail.com wrote:
Excerpts from Michael
Hi Michael,
If you just replace all 'str' with 'String' when reading the signature
then that will almost certainly be sufficient for your purposes. So
read it as:
fromAttrib :: String - Tag String - String
Where Tag String can be thought of as just Tag. If you try to
parse HTML with regular