List<?> children = xpath.selectNodes("node()", element);
for (Object child : children) {
if (child instanceof Element) {
process(child, new ObjectContext(child), context, conventions);
} else if (child instanceof Comment) {
Comment comment = (Comment) child;
sw.writeComment(comment.getText());
} else if (child instanceof ProcessingInstruction) {
ProcessingInstruction pi = (ProcessingInstruction) child;
sw.writePI(pi.getText(), pi.getTarget());
} else if (child instanceof TextValue) {
TextValue tv = (TextValue) child;