Nifi: Parse Error for Xml file with 2 doubled tags
Hello!
Xml file has the following structure:
<root>
<nested1>
<nested2>
<nested1>value</nested1>
</nested2>
</nested1>
</root>
EvaluateXPath processor type_rec property: name(/*/*[1])
And I got the following error:
EvaluateXPath[id=ce4e0c05-169f-387f-520d-77e2e664bacc] Input parsing failed FlowFile[filename=69de5f2c-a887-4042-8734-beca03e3d27b]: org.apache.nifi.xml.processing.ProcessingException: Parsing failed
- Caused by: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 5; The element type "nested2" must be terminated by the matching end-tag "</nested2>".
As I understand, parser except, at 4 level closed tag </nested1> , because it'v met open tag with the same name at level 2 (<nested1>). But at level 4 file has a new tag with the same name.
I tried to use ReplcaseText processor for replace
<nested2>
<nested1>
tag combination
with new value - for example:
<nested2>
<nested1_new>
So I tried to rename "nested1" at 4 level with "nested1_new" value. But without result - nothing is replaced.
It there are other ways to solve this problem?
Thanks.





