📄 overview-summary-sarissa_ieemu_xpath.js.html
字号:
<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><html><head><title>sarissa Overview</title><link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style"><script>function asd() { parent.document.title="sarissa_ieemu_xpath.js Overview"; }</script></head><body bgcolor="#eeeeee" onload="asd();"><!-- ========== START OF NAVBAR ========== --><a name="navbar_top"><!-- --></a><table border="0" width="100%" cellpadding="1" cellspacing="0"><tr><td colspan=2 bgcolor="#b8cade" class="NavBarCell1"><a name="navbar_top_firstrow"><!-- --></a><table border="0" cellpadding="0" cellspacing="3"> <tr align="center" valign="top"> <td bgcolor="#b8cade" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a> </td> <td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>File</b></font> </td> <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font> </td> <td bgcolor="#b8cade" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td> <td bgcolor="#b8cade" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a> </td> <td bgcolor="#b8cade" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td> </tr></table></td><td bgcolor="#b8cade" align="right" valign="top"><em><b>sarissa</b></em></td></tr><tr><td bgcolor="#eeeeee" class="NavBarCell2"><font size="-2"> PREV NEXT</font></td><td bgcolor="#eeeeee" class="NavBarCell2"><font size="-2"> <a href="index.html" target="_top"><b>FRAMES</b></a> <a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a> <script> <!-- if(window==top) { document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></script><noscript><a href="allclasses-noframe.html" target=""><b>All Classes</b></a></noscript></font></td></tr></table><!-- =========== END OF NAVBAR =========== --><hr><center> <h2>sarissa_ieemu_xpath.js</h2> </center> <h4>Summary</h4><p> No overview generated for 'sarissa_ieemu_xpath.js'<BR/><BR/> </p><hr><!-- ========== METHOD SUMMARY =========== --><!-- ========== END METHOD SUMMARY =========== --> <pre class="sourceview"><span class="comment">/** * ==================================================================== * About * ==================================================================== * Sarissa cross browser XML library - IE XPath Emulation * <span class="attrib">@version</span> 0.9.7.6 * <span class="attrib">@author</span>: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net * * This script emulates Internet Explorer's selectNodes and selectSingleNode * for Mozilla. Associating namespace prefixes with URIs for your XPath queries * is easy with IE's setProperty. * USers may also map a namespace prefix to a default (unprefixed) namespace in the * source document with Sarissa.setXpathNamespaces * * * ==================================================================== * Licence * ==================================================================== * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher, * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If * you make modifications under the ASL, i would appreciate it if you submitted those. * In case your copy of Sarissa does not include the license texts, you may find * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and * <a href="http://www.apache.org">http://www.apache.org</a>. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */</span><span class="reserved">if</span>(_SARISSA_HAS_DOM_FEATURE && document.implementation.hasFeature(<span class="literal">"XPath"</span>, <span class="literal">"3.0"</span>)){ <span class="comment">/** * <p>SarissaNodeList behaves as a NodeList but is only used as a result to <code>selectNodes</code>, * so it also has some properties IEs proprietery object features.</p> * <span class="attrib">@private</span> * <span class="attrib">@constructor</span> * <span class="attrib">@argument</span> i the (initial) list size */</span> <span class="reserved">function</span> SarissaNodeList(i){ <span class="reserved">this</span>.length = i; }; <span class="comment">/** <p>Set an Array as the prototype object</p> */</span> SarissaNodeList.<span class="reserved">prototype</span> = new Array(0); <span class="comment">/** <p>Inherit the Array constructor </p> */</span> SarissaNodeList.<span class="reserved">prototype</span>.constructor = Array; <span class="comment">/** * <p>Returns the node at the specified index or null if the given index * is greater than the list size or less than zero </p> * <p><b>Note</b> that in ECMAScript you can also use the square-bracket * array notation instead of calling <code>item</code> * <span class="attrib">@argument</span> i the index of the member to return * <span class="attrib">@returns</span> the member corresponding to the given index */</span> SarissaNodeList.<span class="reserved">prototype</span>.item = <span class="reserved">function</span>(i) { <span class="reserved">return</span> (i < 0 || i >= <span class="reserved">this</span>.length)?null:<span class="reserved">this</span>[i]; }; <span class="comment">/** * <p>Emulate IE's expr property * (Here the SarissaNodeList object is given as the result of selectNodes).</p> * <span class="attrib">@returns</span> the XPath expression passed to selectNodes that resulted in * this SarissaNodeList */</span> SarissaNodeList.<span class="reserved">prototype</span>.expr = <span class="literal">""</span>; <span class="comment">/** dummy, used to accept IE's stuff without throwing errors */</span> <span class="reserved">if</span>(window.XMLDocument && (!XMLDocument.<span class="reserved">prototype</span>.setProperty)){ XMLDocument.<span class="reserved">prototype</span>.setProperty = <span class="reserved">function</span>(x,y){}; }; <span class="comment">/** * <p>Programmatically control namespace URI/prefix mappings for XPath * queries.</p> * <p>This method comes especially handy when used to apply XPath queries * on XML documents with a default namespace, as there is no other way * of mapping that to a prefix.</p> * <p>Using no namespace prefix in DOM Level 3 XPath queries, implies you * are looking for elements in the null namespace. If you need to look * for nodes in the default namespace, you need to map a prefix to it * first like:</p> * <pre>Sarissa.setXpathNamespaces(oDoc, &quot;xmlns:myprefix=&amp;aposhttp://mynsURI&amp;apos&quot;);</pre> * <p><b>Note 1 </b>: Use this method only if the source document features * a default namespace (without a prefix), otherwise just use IE's setProperty
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -