call-seq:
transform(document, params = [])
Apply an XSLT stylesheet to an XML::Document. params is an array of strings used as XSLT parameters. returns Nokogiri::XML::Document
Example:
doc = Nokogiri::XML(File.read(ARGV[0])) xslt = Nokogiri::XSLT(File.read(ARGV[1])) puts xslt.transform(doc, ['key', 'value'])
LIBXML_PARSER_VERSION | = | LibXML.__xmlParserVersion().read_pointer.read_string | ||
LIBXML_VERSION | = | LIBXML_PARSER_VERSION.scan(/^(.*)(..)(..)$/).first.collect{|j|j.to_i}.join(".") | ||
VERSION | = | '1.3.3' | The version of Nokogiri you are using | |
VERSION_INFO | = | {} | More complete version information about libxml |
Parse HTML. Convenience method for Nokogiri::HTML::Document.parse
Parse a document and add the Slop decorator. The Slop decorator implements method_missing such that methods may be used instead of CSS or XPath. For example:
doc = Nokogiri::Slop(<<-eohtml) <html> <body> <p>first</p> <p>second</p> </body> </html> eohtml assert_equal('second', doc.html.body.p[1].text)
Parse XML. Convenience method for Nokogiri::XML::Document.parse
Create a Nokogiri::XSLT::Stylesheet with stylesheet.
Example:
xslt = Nokogiri::XSLT(File.read(ARGV[0]))