Remove whitespace, new line from XML tag text
I am using XMLDecoder to read the following XML input and get an object out of it. If you observe here the value in "<string>" is split into two lines. So when I print this field value from java object it comes as "spouse agency |||||||interact". I would like to get it as one string in one line.
I have tried the method replaceAll("[\\r\\f\\n]","") when reading the input, but it is not helpful. Please help!!!
<object
class="com.package.AgencyInteraction">
<void property="agencyName">
<string>spouse agency
interact</string>
</void>
<void property="completed">
<boolean>true</boolean>
</void>
<void property="interactionType">
<array
class="java.lang.String"
length="1">
<void index="0">
<string>It is
Regulated</string>
</void>
</array>
</void>
</object>
Thanks

