[ONOS-5884]YANG Serializer: Implement XML serializer.
Change-Id: Idffda88938d9c6c7b7c7814127a340bd2dc35039
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/DefaultAnnotation.java b/runtime/src/main/java/org/onosproject/yang/runtime/DefaultAnnotation.java
index 9c011e7..0f75340 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/DefaultAnnotation.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/DefaultAnnotation.java
@@ -35,7 +35,7 @@
* @param n annotation name
* @param v annotation value
*/
- protected DefaultAnnotation(String n, String v) {
+ public DefaultAnnotation(String n, String v) {
name = n;
value = v;
}
diff --git a/runtime/src/test/resources/schemaProviderTestYangFiles/food.yang b/runtime/src/test/resources/schemaProviderTestYangFiles/food.yang
index b340438..4c87fa0 100644
--- a/runtime/src/test/resources/schemaProviderTestYangFiles/food.yang
+++ b/runtime/src/test/resources/schemaProviderTestYangFiles/food.yang
@@ -17,7 +17,6 @@
container food {
choice snack {
case sportsarena {
-
leaf pretzel {
type empty;
}
@@ -44,6 +43,18 @@
}
}
}
+ leaf p1 {
+ type string;
+ }
+ leaf-list p2 {
+ type string;
+ }
+ }
+
+ container c2 {
+ leaf p3 {
+ type string;
+ }
}
leaf bool {
diff --git a/runtime/src/test/resources/xmlAttributes.yang b/runtime/src/test/resources/xmlAttributes.yang
new file mode 100644
index 0000000..f9f3f93
--- /dev/null
+++ b/runtime/src/test/resources/xmlAttributes.yang
@@ -0,0 +1,23 @@
+module attributes {
+ yang-version 1;
+ namespace "http://example.com/schema/1.2/config";
+ prefix "attr";
+ container top {
+ container interface {
+ leaf name {
+ type string;
+ }
+ leaf mtu {
+ type string;
+ }
+ container address {
+ leaf name {
+ type string;
+ }
+ leaf prefix-length {
+ type string;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file