Skip to Content
0
Former Member
Jul 14, 2008 at 09:27 AM

Blanks in Java Mapping

49 Views

Hello experts,

we have a 2 step mapping in our scenario. Firstly we use the graphical mapping and set blanks to all fields that are not filled.

So we have a structure like

<head></head>
<pos1>
  <value1>100</value1>
  <value2>         </value2>
</pos1>
<pos2>
  <value1>   </value1>
  <value2>         </value2>
</pos2>

When I do a java mapping after that, he ignores all blanks and makes a structure like:

<head></head>
<pos1>
  <value1>100</value1>
  <value2></value2>
</pos1>
<pos2>
  <value1></value1>
  <value2></value2>
</pos2>

How can I keep the blanks? I tried

DocumentBuilderFactory factory =
                DocumentBuilderFactory.newInstance();
            factory.setIgnoringElementContentWhitespace(false);

in the Java Code, but the blanks are still ignored...

Best regards,

David