public static void main(String[] args) throws Exception {
new XQueryUpdateTest().run(args);
}
private void run(String[] args) throws Exception {
Document doc = new Builder().build(new File("samples/data/articles.xml"));
System.out.println("input=\n" + XOMUtil.toPrettyXML(doc));
// update(doc, "//article[@name='chair']", "(. , ., .)", "make copies");
update(doc, "//node() | //@*", ".", "identity transform");
update(doc, "//@*", "()", "delete all attributes");
update(doc, "//article[@name='chair']", "()", "delete all chairs");