Advertisement
rotrevrep

XPath with Html (Xml-Vala)

Dec 2nd, 2013
1,163
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement