[jQuery] To what extent is XPath actually supported?
<div>I have this simple markup:</div>
<div> </div>
<div><strong>componentDom.innerHTML</strong> = </div>
<div> </div>
<div><form action="">
<h1 name="formTitle"></h1>
<p name="formInstructions">
<div name="top">
</div>
<div name="formContent">
<divname="column"><div ></div></div>
</div>
<div name="bottom">
<input type="submit" name="defaultButton" value="Submit"/>
</div>
</form>
</div>
<div> </div>
<div>I'm executing this xpath calls with the following results:</div>
<div> </div>
<div> $('form/div[@name]', componentDom).length = 3</div>
<div>
$('form/div[@name]', componentDom)[0].innerHTML = ""</div>
<div>
$('form/div[@name]', componentDom)[1].innerHTML = "<DIV name=\"column\">
<DIV></DIV></DIV>"</div>
<div>
$('form/div[@name]', componentDom)[2].innerHTML "<INPUT type=submit value=Submit name=defaultButton> "</div>
<div>
$('form/div[@name]/input', componentDom) Object required Error
</div>
<div> $('//div', componentDom) 'undefined' is null or not an object Error
</div>
<div> $('form//div', componentDom).length = 6 </div>
<div> </div>
<div> $('form//div/input', componentDom).length = Object required Error</div>
<div>
</div>
<div> </div>
<div>I don't understand why it's failing! I'm just asking for the input which it's obviously there, under the last DIV. Like this, I've come across many really simple XPath queries that just don't work. Am I doing something wrong? Is it XPath actually supported?
</div>
<div> </div>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/