This project has moved and is read-only. For the latest updates, please go here.

extracting attributes...oh so stuck!

Sep 10, 2009 at 7:57 AM

so, here's a snippet of html:

<form action="" id="submission">
			<span id="label-typeA">Choose a Size:</span>&nbsp;
			<input type="text" id="amount" maxlength="5" size="2" Value="1" name="amount">
			<select onchange="updateInfo()" name="units" id="units">
				<option value="162">Screws (1 inch)</option>
				<option value="28.35">oz</option>
				<option value="1">g</option>
I want to extract:
a) The '1' from Value="1" on the <input ...> line.
b) the value "162" and seperately, the text "Screws (1 inch)"
c) as above for 28.35 and oz and 1 and g.
I am SOOOO stuck with the xpath string/htmldoc.selectsinglenode parameters...can someone unscramble my head...???