title: Docx4j line breaks in a string
body: <p>I have this String:</p>
  
  <pre><code>Prueba
  Lista:
  - li1
  - li2
  - li3
  - li4
  
                 Tabulado
                 Tabulado                   Tabulado                   Tabulado                   Tabulado
                 Tabulado                   Tabulado                   Tabulado                   Tabulado                   Tabulado                   Tabulado
                 Tabulado                   Tabulado                   Tabulado                   Tabulado                   Tabulado                   Tabulado                   Tabulado                   Tabulado
  </code></pre>
  
  <p>but when I prepare my .docx the string is printed like this:</p>
  
  <pre><code>Prueba Listas: - li1 - li2 - li3 - li4 Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado
  Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado Tabulado
  </code></pre>
  
  <p>Here is where I get the string:</p>
  
  <pre><code>String escDesc = report.getDescription();
  if (escDesc.contains("\n")){
     //escDesc = escDesc.replaceAll("\\n", System.getProperty("line.separator"));
     //escDesc  = escDesc.replaceAll("\\n", "&lt;w:br/&gt;");
  }
  escDesc = StringEscapeUtils.escapeXml(escDesc); 
  
  valuesAdd.put("DESCRIPCION", escDesc);  
  </code></pre>
  
  <p>And here is where I add all the variebles:</p>
  
  <pre><code>private void replacePlaceholders()
        throws Exception {
  
    MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
  
    VariablePrepare.prepare(wordMLPackage);
  
    documentPart.variableReplace(valuesAdd);
  
    List&lt;SectionWrapper&gt; sectionWrappers = wordMLPackage.getDocumentModel().getSections();
    String xml = null;
  
    for (SectionWrapper sw : sectionWrappers) {
      HeaderFooterPolicy hfp = sw.getHeaderFooterPolicy();
  
      if (hfp != null) {
  
        HeaderPart headerPart = hfp.getDefaultHeader();
  
        if (headerPart != null) {
            xml = XmlUtils.marshaltoString(headerPart.getJaxbElement());
        }
  
  
      Object obj = null;
      try {
        obj = XmlUtils.unmarshallFromTemplate(xml, valuesAdd);
      } catch (JAXBException e) {
        e.printStackTrace();
      }
  
      // Inject result into docx
      headerPart.setJaxbElement((Hdr) obj);
      }
    }
  }
  </code></pre>
  
  <p>I want to keep the \n but i don't know what I have to do right now I hope that someone can give me a few tips.</p>
  
  <p>This is a <code>System.out.println(escDesc);</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/DPA9i.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DPA9i.jpg" alt="enter image description here"></a></p>
  
  <p>And this is the string in the document:</p>
  
  <p><a href="https://i.stack.imgur.com/MQUef.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MQUef.jpg" alt="enter image description here"></a>
  Thanks.</p>