I am trying to pattern match these values which are returned by running mochixpath. The pattern is clearly [elemName, htmlAttrs, children], but what I really need from the following values is UserNameA and "This is a message"
[{"tr", [{"bgcolor", "White"}],
[{"td", [{"class", "Topic"}],
[{"div", [],
[{"a", [{"class", "lnkUserName"}, {"href", "/users/prof.aspx?u=27149"}],
["UserNameA"]
}]
}]},
{"img", [{"alt", ""}, {"src", "/Images/Icons/userIcon.gif"}], []},
{"td", [{"class", "bHeader"}],
[{"div", [{"style", "float:left;width:77%;"}],[
{"a", [{"class", "PostDisplay"}],
["This is a message"]}]
}]
}]
Essentially I'm using the parsed xml from the output of the xpath to get the username and the message they sent. I am very new to elixir and the concept of pattern matching so any help is greatly appreciated.