I have a very large/long web page that I need to parse and grab the text from the value element (in this case “Medway”). I tried so many ways to do it, but can’t seem to capture that word.
<span class="instructionalTextBlue">Structure Name:</span>
<td colspan="3" nowrap="">
<input class="instructionalTextBoxBlue" maxlength="80" name="sitename" size="50" type="text" value="Medway">
<span class="instructionalTextFieldBlue">(Field owned by IT)</span>
if you transfer your text into xml you can extract your value with a xpath query.
Thank you for the response. I tried it, but I am failing…just don’t know what i am doing wrong…
Can you please look to see if there is anything obviously incorrect? “String to XML” node is problematic.
Thank you again.
You also use only the text column for the conversion to XML?
Yes, tried that too - doesn’t work.
Just curious, how did you create that file you tested? did you just add the 1st line?
Thank you again…
it works with both, with xml row and without. I attach both files and the workflow. The raw text is a copy&paste of your text in your first message.
I hope it helps
testXML.knwf (21.8 KB) rawtext.txt (997 Bytes) xmltext.txt (1.0 KB)
Many, Many thanks @Andrew_Steel. This really really helps.
Now another question. My txt file is greater than 2000 rows. There is a limit of 2000 rows of preview in the XPATH node. How can I look at the bottom bit as I need to click and capture the XPATH for data at the bottom?
Thank you again.
Another question please - promise this is the last one.
In a dropdown and select field, how do I capture the selected value? In this case No.
Thank you, again. I really do appreciate it…
<td>Is this a Structure?</td>
<td><select name="sensitive"><option value="">SELECT</option>
<option value="0" selected="selected">No</option>
for such cases the txt file is greater than 2000 rows the Xpath queries can only be entered manually.
Add XPath without a preselection and fill in the XPath query, Column name …
Your second question:
If you need only the value SELECT you can use
If you need all option values you can use
Set Type to
again, Many thanks, @Andrew_Steel.
Have a great Weekend!!!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.