[YANGTOOLS-864] XmlParserStream.readAnyXmlValue ignores namespaces Created: 14/Mar/18  Updated: 01/Jan/19  Resolved: 01/Jan/19

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: 1.2.2
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Marek Gradzki Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates YANGTOOLS-923 Opendaylight netconf parser removes n... Resolved

 Description   

The xmlns attribute is only added for the element of anyxml type.

Example:

<config> node of

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <copy-config>
        <target>
            <candidate/>
        </target>
        <source>
            <config>
                <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
                    <interface>
                        <name>GigabitEthernet0/8/0</name>
                        <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
                    </interface>
                </interfaces>
            </config>
        </source>
    </copy-config>
</rpc>

is parsed as:

 

<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <interfaces>
        <interface>
            <name>GigabitEthernet0/8/0</name>
            <type>x:ethernetCsmacd</type>
         </interface>
    </interfaces>
</config>

 

 

This causes troubles when implementing RPCs with anyxml nodes, because

Netconf's RuntimeRpc.rpcToNNode uses XmlParserStream to produce BI representation

of RPC.



 Comments   
Comment by Robert Varga [ 01/Jan/19 ]

Duplicate of YANGTOOLS-923

Generated at Wed Feb 07 20:54:31 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.