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

Convert xml pretty print

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Low Low
    • 4.0.6, 5.0.5
    • None
    • netconf
    • None

      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.

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

              Created:
              Updated:
              Resolved: