use of com.helger.xml.microdom.IMicroElement in project as2-server by phax.
the class XMLCommandRegistry method load.
public void load(@Nonnull final InputStream in) throws OpenAS2Exception {
final IMicroDocument aDoc = MicroReader.readMicroXML(in);
final IMicroElement eRoot = aDoc.getDocumentElement();
clearCommands();
for (final IMicroElement eElement : eRoot.getAllChildElements()) {
final String sNodeName = eElement.getTagName();
if (sNodeName.equals("command"))
loadCommand(eElement, null);
else if (sNodeName.equals("multicommand"))
loadMultiCommand(eElement, null);
else
throw new OpenAS2Exception("Undefined tag: " + sNodeName);
}
}
Aggregations