1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
|
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<STYLE TYPE="text/css">@import "style.css";</STYLE>
</HEAD>
<BODY>
<H1>class Elements</H1>
<B>Includes </B>Enumerable<HR>
A class which provides filtering of children for Elements, and XPath search support.
<H2>Methods</H2>
<UL>
<LI>
<A HREF="#ND">[]</A>
</LI>
<LI>
<A HREF="#N14">[]=</A>
</LI>
<LI>
<A HREF="#N37">add</A>
</LI>
<LI>
<A HREF="#N29">delete</A>
</LI>
<LI>
<A HREF="#N30">delete_all</A>
</LI>
<LI>
<A HREF="#N43">each</A>
</LI>
<LI>
<A HREF="#N1B">empty</A>
</LI>
<LI>
<A HREF="#N22">index</A>
</LI>
<LI>
<A HREF="#N9">initialize</A>
</LI>
<LI>
<A HREF="#N4D">literalize</A>
</LI>
<LI>
<A HREF="#N47">size</A>
</LI>
<LI>
<A HREF="#N4A">to_a</A>
</LI>
</UL>
<HR>
<H2>Aliases</H2>
<DIV CLASS="alias">
<H3><<</H3>
is a synonym for
<H3>add</H3>
</DIV>
<H2>Methods</H2>
<DIV CLASS="method">
<A NAME="ND">
<H3>[]</H3>
</A><B style="padding-right: 1em;">Returns</B>
the first matching Element, or nil if no child matched
<HR>
Fetches a child element
</DIV>
<DIV CLASS="method">
<A NAME="N14">
<H3>[]=</H3>
</A><B style="padding-right: 1em;">Returns</B>
the previous element; nil if no previous element was found.
<HR>
Sets an element, replacing any previous matching element. If no existing element is found ,the element is added.
</DIV>
<DIV CLASS="method">
<A NAME="N37">
<H3>add</H3>
</A><B style="padding-right: 1em;">Returns</B>
the added Element
<HR>
Adds an element
</DIV>
<DIV CLASS="method">
<A NAME="N29">
<H3>delete</H3>
</A><B style="padding-right: 1em;">Returns</B>
the removed child
<HR>
Deletes a child Element
</DIV>
<DIV CLASS="method">
<A NAME="N30">
<H3>delete_all</H3>
</A><B style="padding-right: 1em;">Returns</B>
an Array of Elements that have been removed
<HR>
Removes multiple elements
</DIV>
<DIV CLASS="method">
<A NAME="N43">
<H3>each</H3>
</A>
<HR>
Iterates through all of the child Elements, optionally filtering them by a given XPath Only supply the first parameter (and a block). The second parameter is used internally for recursion.
</DIV>
<DIV CLASS="method">
<A NAME="N1B">
<H3>empty</H3>
</A><B style="padding-right: 1em;">Returns</B>
true if there are no Element children, false otherwise
<HR>
</DIV>
<DIV CLASS="method">
<A NAME="N22">
<H3>index</H3>
</A><B style="padding-right: 1em;">Returns</B>
the index of the supplied child (starting at 1), or -1 if the element is not a child
<HR>
@return the index of the supplied child (starting at 1), or -1 if the element is not a child
</DIV>
<DIV CLASS="method">
<A NAME="N9">
<H3>initialize</H3>
</A>
<HR>
Constructor
</DIV>
<DIV CLASS="method">
<A NAME="N4D">
<H3>literalize</H3>
</A>
<HR>
A private helper method
</DIV>
<DIV CLASS="method">
<A NAME="N47">
<H3>size</H3>
</A>
<HR>
</DIV>
<DIV CLASS="method">
<A NAME="N4A">
<H3>to_a</H3>
</A>
<HR>
</DIV>
<DIV CLASS="footer">
API documentation generated by <A HREF="http://www.germane-software.com/~ser/Software/api2xml">API2XML</A>
</DIV>
</BODY>
</HTML>
|