Module: Nokogiri::XML
- Defined in:
- lib/nokogiri/xml.rb,
lib/nokogiri/xml/dtd.rb,
lib/nokogiri/xml/sax.rb,
lib/nokogiri/xml/node.rb,
lib/nokogiri/xml/text.rb,
lib/nokogiri/xml/cdata.rb,
lib/nokogiri/xml/xpath.rb,
lib/nokogiri/xml/reader.rb,
lib/nokogiri/xml/builder.rb,
lib/nokogiri/xml/document.rb,
lib/nokogiri/xml/node_set.rb,
lib/nokogiri/xml/notation.rb,
lib/nokogiri/xml/sax/parser.rb,
lib/nokogiri/xml/sax/document.rb,
lib/nokogiri/xml/syntax_error.rb,
lib/nokogiri/xml/after_handler.rb,
lib/nokogiri/xml/xpath_context.rb,
lib/nokogiri/xml/before_handler.rb,
ext/nokogiri/xml_dtd.c,
ext/nokogiri/xml_cdata.c,
ext/nokogiri/xml_xpath.c,
ext/nokogiri/xml_reader.c,
ext/nokogiri/xml_syntax_error.c,
ext/nokogiri/xml_xpath_context.c
Defined Under Namespace
Modules: SAX Classes: AfterHandler, BeforeHandler, Builder, CDATA, CData, DTD, Document, Node, NodeSet, Notation, Reader, SyntaxError, Text, XPath, XPathContext
Constant Summary collapse
- PARSE_RECOVER =
Parser options
1 << 0
- PARSE_NOENT =
Recover from errors
1 << 1
- PARSE_DTDLOAD =
Substitute entities
1 << 2
- PARSE_DTDATTR =
Load external subsets
1 << 3
- PARSE_DTDVALID =
Default DTD attributes
1 << 4
- PARSE_NOERROR =
validate with the DTD
1 << 5
- PARSE_NOWARNING =
suppress error reports
1 << 6
- PARSE_PEDANTIC =
suppress warning reports
1 << 7
- PARSE_NOBLANKS =
pedantic error reporting
1 << 8
- PARSE_SAX1 =
remove blank nodes
1 << 9
- PARSE_XINCLUDE =
use the SAX1 interface internally
1 << 10
- PARSE_NONET =
Implement XInclude substitition
1 << 11
- PARSE_NODICT =
Forbid network access
1 << 12
- PARSE_NSCLEAN =
Do not reuse the context dictionnary
1 << 13
- PARSE_NOCDATA =
remove redundant namespaces declarations
1 << 14
- PARSE_NOXINCNODE =
merge CDATA as text nodes
1 << 15
Class Method Summary collapse
- .load_external_subsets=(value = true) ⇒ Object
- .parse(string_or_io, url = nil, encoding = nil, options = 2159) ⇒ Object
- .substitute_entities=(value = true) ⇒ Object
Class Method Details
.load_external_subsets=(value = true) ⇒ Object
62 63 64 |
# File 'lib/nokogiri/xml.rb', line 62 def load_external_subsets=(value = true) Document.load_external_subsets = value end |
.parse(string_or_io, url = nil, encoding = nil, options = 2159) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/nokogiri/xml.rb', line 46 def parse string_or_io, url = nil, encoding = nil, = 2159 if string_or_io.respond_to?(:read) url ||= string_or_io.respond_to?(:path) ? string_or_io.path : nil string_or_io = string_or_io.read end # read_memory pukes on empty docs return Document.new if string_or_io.nil? or string_or_io.empty? Document.read_memory(string_or_io, url, encoding, ) end |
.substitute_entities=(value = true) ⇒ Object
58 59 60 |
# File 'lib/nokogiri/xml.rb', line 58 def substitute_entities=(value = true) Document.substitute_entities = value end |