xtract icon indicating copy to clipboard operation
xtract copied to clipboard

Parsing XML with repetitive tags

Open Kailasht1 opened this issue 4 years ago • 1 comments

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

Kailasht1 avatar Apr 15 '20 18:04 Kailasht1

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

tmccombs avatar Jan 04 '21 06:01 tmccombs