*/
package org.opendaylight.controller.netconf.util.xml;
+import org.opendaylight.controller.netconf.api.NetconfMessage;
import org.openexi.proc.common.AlignmentType;
import org.openexi.proc.common.EXIOptions;
import org.openexi.proc.common.EXIOptionsException;
this.options = Preconditions.checkNotNull(options);
}
- public static EXIParameters forXmlElement(final XmlElement root) throws EXIOptionsException {
+ public static EXIParameters fromNetconfMessage(final NetconfMessage root) throws EXIOptionsException {
+ return fromXmlElement(XmlElement.fromDomDocument(root.getDocument()));
+ }
+
+ public static EXIParameters fromXmlElement(final XmlElement root) throws EXIOptionsException {
final EXIOptions options = new EXIOptions();
options.setAlignmentType(AlignmentType.bitPacked);
}
if (root.getElementsByTagName(EXI_PARAMETER_SCHEMA).getLength() > 0) {
+/*
+ GrammarFactory grammarFactory = GrammarFactory.newInstance();
+ if (operationElement
+ .getElementsByTagName(EXI_PARAMETER_SCHEMA_NONE)
+ .getLength() > 0) {
+ this.grammars = grammarFactory.createSchemaLessGrammars();
+ }
+
+ if (operationElement.getElementsByTagName(
+ EXI_PARAMETER_SCHEMA_BUILT_IN).getLength() > 0) {
+ this.grammars = grammarFactory.createXSDTypesOnlyGrammars();
+ }
- // GrammarFactory grammarFactory = GrammarFactory.newInstance();
- // if (operationElement
- // .getElementsByTagName(EXI_PARAMETER_SCHEMA_NONE)
- // .getLength() > 0) {
- // this.grammars = grammarFactory.createSchemaLessGrammars();
- // }
- //
- // if (operationElement.getElementsByTagName(
- // EXI_PARAMETER_SCHEMA_BUILT_IN).getLength() > 0) {
- // this.grammars = grammarFactory.createXSDTypesOnlyGrammars();
- // }
- //
- // if (operationElement.getElementsByTagName(
- // EXI_PARAMETER_SCHEMA_BASE_1_1).getLength() > 0) {
- // this.grammars = grammarFactory
- // .createGrammars(NETCONF_XSD_LOCATION);
- // }
+ if (operationElement.getElementsByTagName(
+ EXI_PARAMETER_SCHEMA_BASE_1_1).getLength() > 0) {
+ this.grammars = grammarFactory
+ .createGrammars(NETCONF_XSD_LOCATION);
+ }
+*/
}