ri > Nokogiri::HTML4::Document

📛 NAME

Nokogiri::HTML4::Document < Nokogiri::XML::Document (from /home/chedong/.local/share/rdoc)

🚀 Quick Reference

Use CaseCommandDescription
Parse HTML stringNokogiri::HTML4::Document.parse(html_string)Parses an HTML string into a document
Parse HTML fileNokogiri::HTML4::Document.parse(File.read(path))Parses an HTML file into a document
Get document titledoc.titleReturns the <title> content
Set document titledoc.title = "new title"Sets the <title> content
Get meta encodingdoc.meta_encodingReturns encoding from meta tag
Set meta encodingdoc.meta_encoding = "UTF-8"Sets encoding in meta tag
Serialize to HTMLdoc.serializeSerializes the document to HTML string
Create fragmentdoc.fragment(html_string)Creates a document fragment from HTML
XPath doctypedoc.xpath_doctypeReturns the DOCTYPE as XPath expression

🔧 Class Methods

🔧 Instance Methods

Nokogiri::HTML4::Document
📛 NAME 🚀 Quick Reference 🔧 Class Methods 🔧 Instance Methods

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-29 00:47 @216.73.217.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format