xmltools: converted StructuredElemStack to java