Advertisement
rotrevrep

Xml & Gjs

Aug 7th, 2013
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/gjs
  2.  
  3. const Mee = imports.gi.Mee;
  4.  
  5. var doc = Mee.XmlDoc.load_file("win.ui");
  6. var list = doc.get_elements_by_tag_name("property");
  7. for (var i = 0; i < list.length; i++) {
  8.     print(list[i].get_prop("name")+": "+list[i].get_child(0).content);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement