Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13699

Spin XML adds blank lines if input is already pretty printed

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.18.0, 7.18.0-alpha2
    • 7.14.0, 7.15.0
    • spin
    • None

      Environment (Required on creation):

      Tested on Camunda 7.14

      Steps to reproduce (Required on creation):

      Add an already formatted XML into a SPIN variable 

       

      SpinXmlElement spinXml = Spin.XML(value);
      execution.setVariable ("test", spinXml);

      Let's assume value is the following XML: 

       

      <test>
        <message>Camunda is awesome!</message>
      </test>  
      

      Then the value is either shown in the UI or is read by the java api using

      execution.getVariable("test");
      

       

      Observed Behavior (Required on creation):

      The value is shown as:

      <test>
      
        <message>Camunda is awesome!</message>
      
      </test>  
      

      Expected behavior (Required on creation):

      <test>
        <message>Camunda is awesome!</message>
      </test> 
      

      Root Cause (Required on prioritization):

      The XML is formatted again and any CR returns an empty line. When reading the XML and then inserting it again any blank line is even doubled. 

      Solution Ideas (Optional):

      Make DomXmlDataFormatWriter prettyPrint aware and strip empty lines. 

      Hints (Optional):

        This is the controller panel for Smart Panels app

              thorben.lindhauer Thorben Lindhauer
              jomu Joern Muehlencord
              Thorben Lindhauer Thorben Lindhauer
              Nikola Koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: