Advertisement
rotrevrep

XPath with Html (Xml-Vala)

Dec 2nd, 2013
3,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.31 KB | None | 0 0
  1. void main ()
  2. {
  3.     var doc = new Html.Doc ();
  4.     doc.load_uri ("http://www.youtube.com/results?search_query=otep", Xml.ParseOptions.CheckHtmlUtags);
  5.     var xpath = new Xml.XPath (doc.root_node);
  6.     xpath.eval ("//link[@rel='stylesheet']");
  7.     foreach (var node in xpath.result)
  8.         print ("%s\n *** \n", node.dump (0));
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement