Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-988

Convert xml pretty print

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Done
    • None
    • 4.0.6, 5.0.5
    • netconf
    • None

    Description

      When we print NetconfMessage, we found that, the print like this:

      <notification xmlns="urn:ietf:params:netconf:capability:notification:1.0">    <event-notification xmlns="http://openconfig.net/yang/event">
          
              <events>
              
                  <id>MODULE_EVENT_1</id>
                  
                  <resource/>
                  
                  <text>transceiver plug off</text>
                  
                  <time-created>1679874955</time-created>
                  
                  <severity xmlns:oc-alarm-types="http://openconfig.net/yang/alarms/types">oc-alarm-types:MAJOR</severity>
                  
                  <type-id>EVENT</type-id>
                  
                  <vendor-type/>
                  
                  <event-abbreviate>MODULE-PLUGOFF</event-abbreviate>
                  
                  <hostname>test</hostname>
                  
              </events>
              
          </event-notification>
          
          <eventTime>2023-03-31T02:16:18.672Z</eventTime>
          
      </notification> 

      his has been discussed in this JDK bug ticket.

      We shoud use a stylesheet to remove empty Text nodes.

      Attachments

        # Subject Branch Project Status CR V

        Activity

          People

            zw1127 zhao wei
            zw1127 zhao wei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: