Parse all content between HTML tags using the element ID
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I'm looking for an approach to read all the content inside an HTML tag with an ID that I derive dynamically in the workflow.
Eg.
<HTML>
...
<DIV id="section-1" class="someclass" > <table><tr>...</tr></table>
</DIV>
<DIV id="section-2" class="someclass" > ...
</DIV>
...
</HTML>
A solution somewhat similar to the regex -- <div class=\"someclass\" id=\"' + [DIV_ID] + '\" .*?>.*?<\/div> (not working), that generates the output;
---
<DIV id="section-1" class="someclass" > <table><tr>...</tr></table>
</DIV>
---
And eventually the goal is to extract and list out the <table> contents.
Could anyone provide some suggestions? Thank you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
IF it's all on the same line/record, then you could use the substring function. Here's an example:
Substring([Field1],findstring([Field1],"<table>")+7,findstring([Field1],"</table>")-(findstring([Field1],"<table>")+7))
Otherwise, like @BenMoss said: an example input file for us to use would be best.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @CharlieS, this is close to what I'm looking for.. the only additional ask is to be able to pass the html element id (Div id, in this case) as variable/parameter to the Multi-Row Formula dynamically.. Thank you so much for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@CharlieS, Thank you, Appreciate your help!... actually I thought about putting a filter for the specific 'Sections' and it works similar to the join you suggested.
But again is it possible to pass a parameter in the Multi-Row Formula? The table content needs to be only from section-1, in your solution it is getting the table content for both section-1 & section-2. This is the reason why I was looking for getting only the section-1 block. Any suggestions?
