APP source edit mode = APP Javascript FOM
The way to access the current node during formatting is: formatting.currentXMLNode
Once you have an XML Node object you can run XPath against it: myNode.evaluateXPath("something")
To access child elements in XPath: child::*
So putting it all together: formatting.currentXMLNode.evaluateXPath("child::*")