Author |
Message
|
Laurens |
Posted: Fri Sep 28, 2012 6:30 am Post subject: Email input Node HTML to XML |
|
|
Apprentice
Joined: 01 Oct 2009 Posts: 35
|
Hi all ,
I'm using the emailinput node from message broker 7.0.0.3.
I get my emails alright , but I see that in the
InputRoot.MIME.data.blob.blob the actual data is in HTML - with the whole envelop for the browser.
Any ideas how I can convert this into XML in the broker ? Or any other way to parse it ?
Kindest regards
Laurens |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Sep 28, 2012 7:05 am Post subject: Re: Email input Node HTML to XML |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Laurens wrote: |
Any ideas how I can convert this into XML in the broker ? Or any other way to parse it ? |
You know already the answer: parse the BLOB into XML using the XMLNSC parser from ESQL.
Google the InfoCentre or re-attend the WMB Dev I training class if you still don't remember how to do it. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Laurens |
Posted: Sun Sep 30, 2012 10:43 pm Post subject: |
|
|
Apprentice
Joined: 01 Oct 2009 Posts: 35
|
Hmm,
you cannot parse html by the XMLNSC parser.
If only it would be that easy
Try to parse html by XML SPy you'll see that XML <> HTML |
|
Back to top |
|
 |
kimbert |
Posted: Mon Oct 01, 2012 12:43 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Not all HTML is valid XML - but there are tools and libraries out there which can convert from HTML to XML. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 01, 2012 5:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
First question is: are you sure you need to access the contents of the HTML message?
There may be an additional part to the message that is not in HTML.
Second question is: are you sure that the sender should be sending the message in HTML? |
|
Back to top |
|
 |
Laurens |
Posted: Tue Oct 02, 2012 5:35 am Post subject: |
|
|
Apprentice
Joined: 01 Oct 2009 Posts: 35
|
Unfortunately yes I need to go into the email content (those are automatically generated mails) and yes it is HTML.
So the answer to my question is - I suppose - no the Broker has no additional tools to help me interpret HTML. Thus I'll need to go to java code in the java node to parse HTML myself with some help of some java HTML parser libraries.
A bit odd as now that the email node is included into message broker I expected some embedded 'html' parser.
Anyways , thank you for the answers ! |
|
Back to top |
|
 |
|