cancel
Showing results for 
Search instead for 
Did you mean: 

How to read HTML table

Former Member
0 Kudos

Hi All,

We have a requirement to read a HTML table from static webpage in PI 7.31. Can you please let me know how to achieve this?

Regards,

Ashish

Accepted Solutions (0)

Answers (2)

Answers (2)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

you can also do that in more standard way as shown in my blog:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/01/05/michals-pi-tips-exchange-rates-fr...

Regards,

Michal Krawczyk

subhro_de
Active Participant
0 Kudos

Hi Michal,

One question - does this work for only polling xml files or for all kinds of  files (zip,pdf etc) if the sender interface is a dummy structure.

Regards

Subhro

Former Member
0 Kudos

Hi Michael,

SOAP AXIS works with reading xml files.. when it comes to reading non XML it throws parsing exception...I checked this for polling zip as well as HTML file

Regards,

Ashish

subhro_de
Active Participant
0 Kudos

Hi Ashish,

Not a good method - but you can keep a dummy file and a sender file communication channel in Test mode for polling - sender interface being kept dummy can trigger your scenario periodically.

On the target side call the HTML page over receiver HTTP channel get the response and parse it using async sync without bpm (request response oneway bean) approach.

Regards

Subhro

praveen_sutra
Active Contributor
0 Kudos

hi Ashish,

As per my understanding you can write a java mapping to fetch the data from the webpage and convert the table content in xml format and then process it.

Standard API to parse an HTML page:

http://docs.oracle.com/javase/7/docs/api/javax/swing/text/html/parser/ParserDelegator.html

Eg: how to parse:

http://www.java2s.com/Tutorial/Java/0320__Network/HTMLparserbasedonHTMLEditorKitParserCallback.htm

http://stackoverflow.com/questions/6559139/html-parserdelegator-and-parsercallback-not-working

And secondly I noticed another way to handle this scenario:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/12/http-test-tool-for-sap-pi-73

Hope this is helpful.

thanks and regards,

Praveen T

Former Member
0 Kudos

Praveen,

Java mapping will be called once the message is read in the system. In my case i need to read the HTML table on web page...let me know how to poll data from web page (in HTML form)

Regards,

Ashish