lucidsoftware / xtract

A library to make it easy to deserialize XML to user types in scala
Apache License 2.0
60 stars 20 forks source link

Parsing XML with repetitive tags #31

Open Kailasht1 opened 4 years ago

Kailasht1 commented 4 years ago

Lets say I have a xml data like below

<Root> 
 <Person id = 111>
  <name>xyz</name>
 </Person>
 <Person id = 222>
  <name>abc</name>
 </Person>
 <Person id = 333>
  <name>mno</name>
 </Person>
</Root> 

if there was an error parsing second row (id=222), there is no way I found I could omit that row from ParseResult because errors are captured at a file level rather than at a row (Person tag) level. In this case it will return PartialParseSuccess object with deserialized objects and errors separated. how do we handle such cases?

Thanks

tmccombs commented 3 years ago

Could you provide some sample code for what you are trying to do?