Skip to content

Instantly share code, notes, and snippets.

@bamboo
Created October 11, 2011 12:43
Show Gist options
  • Save bamboo/1277975 to your computer and use it in GitHub Desktop.
Save bamboo/1277975 to your computer and use it in GitHub Desktop.
xpath in unityscript
import System.Xml;
function printAllTypes(file : String) {
var doc = new XmlDocument();
doc.PreserveWhitespace = false;
doc.Load(file);
for (var text: XmlText in doc.SelectNodes("//element/type/text()")) {
print(text.Value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment