3

I have XML file with data. I am use FasterXML to parse it:

xmlMapper.readValue

And when my file has a format :

<w>
    <t name="test"/>
</w>

When i parse this file all work. If i use void tag t, ex. when my file has a format:

<w></w>

All work. But if i have format:

<w>
</w>

I get an error. I want both options to work. How to fix it?

Vitalii T
  • 453
  • 3
  • 13
  • com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token - error – Vitalii T Dec 22 '17 at 14:45

1 Answers1

0

I am ovveride deserialize(...). Added matches("^[\r\n\t ]+$")) to it.

Vitalii T
  • 453
  • 3
  • 13