cancel
Showing results for 
Search instead for 
Did you mean: 

??? Is it Possible to Read an HTML file in PI !!! and check a word"Failure"

Former Member
0 Kudos

Hi All,

My requirement is to pick an HTML file and search for a word " Failure" If its present then i need to update a particular value if not then other value.

Regards,

Jude

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I think it is feasible in multiple ways :

- use a "filter" script in the file adapter that could be built on a grep, that would only collect file with the "failure" pattern

- parse all files and serialize the content into a XML field so you can apply a XPath expression against it (but it could be a pb if files are big and coming quickly)

Other solutions are still possible anyway

Chris

Former Member
0 Kudos

Hi Jude,

Yes it is possible to pickup a HTML file and check for word "Failure" using Java Mapping.

Thanks,

Sathya

Former Member
0 Kudos

Hi all,

Any possible solutions......

Regards,

Jude

former_member181985
Active Contributor
0 Kudos

use XSLT or java mapping.

VijayKonam
Active Contributor
0 Kudos

First question, are the XML and HTML come together with same name or something to link together?

2. Do you have pick both the files every time or just the HTML?

3. Is your HTML file content is XML?

Based on the answers to above questions the implementation would differ.

VJ

jagdishwar_b
Active Participant
0 Kudos

>>My requirement is to pick an HTML file

can be done, if html is welformed xml.

>>and search for a word " Failure"

if you know which tag could contain the word "failure" then i think it is possible to search in graphical mapping.

>>If its present then i need to update a particular value if not then other value.

you said "particular value". Is it in the target message type, if yes, then you can decide.

I am not sure, whether your requirement and the purpose of using PI for this go together.

thanks

BJagdishwar.

Former Member
0 Kudos

Hi ,

I will get an Error log file ( which is XML) and an HTML report file .

I can map the XML file . But i need to check the HTML file , that whether it contains Failure.

Whether its possible to check it in JAVA or XSLT Mapping.????

Regards,

B.Jude