5 ms·
New Compact "Algorithm" for "XML Parsing" with no dependencies, 200RubyCodeLines
- abionic 15y ago$gem install xml-motor use as Example Calls As Code: XMLMotor.get_node_from_content "<A>a</A><B><A>ba</A></B>", "A" RETURNS: ["a", "ba"] XMLMotor.get_node_from_content "<A>a</A><B><A>ba</A></B>", "B.A" RETURNS: ["ba"] XMLMotor.get_node_from_content "<A i='1'>a</A><B><A i='2'>ba</A></B>", "A", "i='1'" RETURNS: ["a"]