Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-864

XmlParserStream.readAnyXmlValue ignores namespaces

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Duplicate
    • 1.2.2
    • None
    • None
    • None

    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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              mgradzki Marek Gradzki
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: