Preserve attributes when parsing AnyXml from XML 79/78479/2
authorJakub Morvay <jmorvay@frinx.io>
Wed, 5 Dec 2018 16:29:38 +0000 (17:29 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 9 Dec 2018 20:37:00 +0000 (20:37 +0000)
commitf0204ae6ea5465aa5e9d4d31a73e483e765a17d6
tree52338842427e24f16f4fa89f9ef771865da7a6fb
parentf53379c22ceae799c634959a82aaddc1c474ae72
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>
(cherry picked from commit 335359d23557e2b54b9df539eeaed8b97668a59e)
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]