public static void main(String[] args) throws ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException {
StructSequence root = new StructSequenceImpl("root");
root.setDelimiter("/");
StructSimple x1 = (StructSimple) new StructSimpleImpl("a").setSimplePattern("aaa").setMinOccurrences(1).setMaxOccurrences(1);
StructSimple y1 = (StructSimple) new StructSimpleImpl("b").setSimplePattern("bbb").setMinOccurrences(1).setMaxOccurrences(1);
root.addChild(x1).addChild(y1);
DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
DOMImplementationLS impl =
(DOMImplementationLS)registry.getDOMImplementation("LS");