Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

Hi,

I have below requirement.

My input file is having valid and invalid xml messages. Using node iterator, i am writing valid messages to one file and invalid messages to another file. The issue here is when IS service recieves unstructured xml data(Ex;syntax errors)
pub.xml:xmlNodeToDocument is failing due to which it is going to catch block and it is stopping the further execution process. Is there anyway to handle this situation other than putting inner try/catch to pub.xml:xmlNodeToDocument service alone. pub.xml:xmlNodeToDocument should not stop the process.

Ragards,
Satish Devineni

Yes you can put a multi try/catch sequences in the flow exactly where the xmlnodetodocument is failing and so that it can goes to the catch block and continues with the main flow.

Did you try put that in place and test it?

What is your code snippet currently doing with just one try catch sequence?

HTH,
RMG

Yes,you can handle this situation as RMG Mentioned

Other way we can do is Identify a common value for Invalid XML and in catch block Branch on same parameter and write to file there it self!!

Thanks Guys for your suggetions. I have same solution before posting this topic. Just posted for another alternative. It will be good if wM have built in service which handles unstructured xml as well. :slight_smile:

Glad you got what you want…