Null data from XML 53/3053/1
authorJozef Gloncak <jgloncak@cisco.com>
Mon, 25 Nov 2013 09:42:58 +0000 (10:42 +0100)
committerJozef Gloncak <jgloncak@cisco.com>
Mon, 25 Nov 2013 09:48:11 +0000 (10:48 +0100)
commita56c86e7e72e2e9c1fd1845358955eba80381ce1
tree8c37e35640375232f8295965bd1d8a5ce6ecc080
parent1f9bfb68dfd3f213d19161be9ddca3bd5ebc1502
Null data from XML

In case of reading data from XMl to Composite node following rule was
added:
- XML with opening and closing tag without data is mapped to single node
  with empty string
  (e. g. <foo></foo> -> single node with empty string)
- XML with only closing tag is mapped to single node with null value (e.
  g. <foo /> -> single node with null value)

Change-Id: I17ba4387949dd3cfe943999829dbcc63a29fbac8
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlReader.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/FromXmlToCompositeNodeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/resources/xml-to-composite-node/data-container-yang/data-container.yang
opendaylight/md-sal/sal-rest-connector/src/test/resources/xml-to-composite-node/data-container.xml