Question

XML fragmenter

  • 17 January 2014
  • 2 replies
  • 11 views

Badge +22
  • Contributor
  • 1959 replies
I'm using an XMLFragmenter where the XML Source Type is an XML file whose's path is stored in an attribute.

 

 

If the xml file is not valid or doesn't exist I get an error:

 

 

0.0|ERROR |XML Parser error: 'unable to open primary document entity 'file: ....

 

 

but the translation continues with the invalid feature being dropped.  

 

 

Is there anyway to record those features.  Ideally I would like to write a text file with the path of all the invalid xml files.

 

 

Joanna

2 replies

Userlevel 2
Badge +17
Hi Joanna,

 

 

I think the XMLValidator transformer is most suitable to do that.

 

 

Takashi
Userlevel 4
Badge +13
Hi,

 

 

Yes the XMLValidator is the one to use for testing the data and or schema.

 

You can test for  the attribute missing (new 2014 null approach)  or is empty ( pre 2014) .

 

The Recorder can be use for saving the invalid files  or a dedicated writer.

 

 

Itay 

Reply