Preserve attributes when parsing AnyXml from XML 66/78466/5
authorJakub Morvay <jmorvay@frinx.io>
Wed, 5 Dec 2018 16:29:38 +0000 (17:29 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 9 Dec 2018 20:09:04 +0000 (21:09 +0100)
commit335359d23557e2b54b9df539eeaed8b97668a59e
tree75c80b00e385b07eb5b1a6ab845e93251a52d877
parentc4692f13d79a5e2899b4073116fa7cc3d725941f
Preserve attributes when parsing AnyXml from XML

So far, anyxml nodes have been parsed in following pipeline:
 String -> DOM -> Stax -> String -> DOM
Now the parsing is simplified to:
 String -> DOM -> Stax -> DOM

Remove the unnecessary "back to string" step. This step is not just
unnecessary but also stripes down attributes and namespaces from AnyXml
node value.

JIRA: YANGTOOLS-923
Change-Id: If13ce9c7397c37b96a532090e67683a635ae14ef
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/XMLStreamNormalizedNodeStreamWriter.java
yang/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/XmlParserStream.java
yang/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/AnyXmlWithParamsParsingTest.java [new file with mode: 0644]
yang/yang-data-codec-xml/src/test/resources/anyxml-support/params/edit.xml [new file with mode: 0644]
yang/yang-data-codec-xml/src/test/resources/anyxml-support/params/ietf-netconf@2011-06-01.yang [new file with mode: 0644]