Module: REXML
- Defined in:
- lib/rexml/rexml.rb,
lib/rexml/node.rb,
lib/rexml/text.rb,
lib/rexml/cdata.rb,
lib/rexml/child.rb,
lib/rexml/xpath.rb,
lib/rexml/entity.rb,
lib/rexml/output.rb,
lib/rexml/parent.rb,
lib/rexml/source.rb,
lib/rexml/comment.rb,
lib/rexml/doctype.rb,
lib/rexml/dtd/dtd.rb,
lib/rexml/element.rb,
lib/rexml/xmldecl.rb,
lib/rexml/document.rb,
lib/rexml/encoding.rb,
lib/rexml/security.rb,
lib/rexml/attribute.rb,
lib/rexml/functions.rb,
lib/rexml/namespace.rb,
lib/rexml/quickpath.rb,
lib/rexml/xmltokens.rb,
lib/rexml/light/node.rb,
lib/rexml/attlistdecl.rb,
lib/rexml/instruction.rb,
lib/rexml/sax2listener.rb,
lib/rexml/xpath_parser.rb,
lib/rexml/xpath_parser.rb,
lib/rexml/dtd/entitydecl.rb,
lib/rexml/parseexception.rb,
lib/rexml/streamlistener.rb,
lib/rexml/dtd/attlistdecl.rb,
lib/rexml/dtd/elementdecl.rb,
lib/rexml/dtd/notationdecl.rb,
lib/rexml/formatters/pretty.rb,
lib/rexml/formatters/default.rb,
lib/rexml/parsers/baseparser.rb,
lib/rexml/parsers/pullparser.rb,
lib/rexml/parsers/sax2parser.rb,
lib/rexml/parsers/treeparser.rb,
lib/rexml/validation/relaxng.rb,
lib/rexml/parsers/lightparser.rb,
lib/rexml/parsers/xpathparser.rb,
lib/rexml/parsers/streamparser.rb,
lib/rexml/formatters/transitive.rb,
lib/rexml/validation/validation.rb,
lib/rexml/parsers/ultralightparser.rb,
lib/rexml/undefinednamespaceexception.rb,
lib/rexml/validation/validationexception.rb
Overview
Module REXML provides classes and methods for parsing, editing, and generating XML.
Implementation
REXML:
-
Is pure Ruby.
-
Provides tree, stream, SAX2, pull, and lightweight APIs.
-
Conforms to XML version 1.0.
-
Fully implements XPath version 1.0.
-
Is non-validating.
-
Passes 100% of the non-validating Oasis tests.
In a Hurry?
If you’re somewhat familiar with XML and have a particular task in mind, you may want to see the tasks pages.
API
Among the most important classes for using REXML are:
-
REXML::Document.
-
REXML::Element.
There’s also an REXML tutorial.
Defined Under Namespace
Modules: DClonable, DTD, Encoding, EntityConst, Formatters, Functions, Light, Namespace, Node, Parsers, SAX2Listener, Security, StreamListener, Validation, XMLTokens Classes: AttlistDecl, Attribute, Attributes, CData, Child, Comment, Declaration, DocType, Document, Element, ElementDecl, Elements, Entity, ExternalEntity, IOSource, Instruction, NotationDecl, Output, Parent, ParseException, QuickPath, ReferenceWriter, Source, SourceFactory, Text, UndefinedNamespaceException, XMLDecl, XPath, XPathNode, XPathParser
Constant Summary collapse
- COPYRIGHT =
"Copyright © 2001-2008 Sean Russell <[email protected]>"
- DATE =
"2008/019"
- VERSION =
"3.2.8"
- REVISION =
""
- Copyright =
COPYRIGHT
- Version =
VERSION
- @@namespaces =
An implementation note about namespaces: As we parse, when we find namespaces we put them in a hash and assign them a unique ID. We then convert the namespace prefix for the node to the unique ID. This makes namespace lookup much faster for the cost of extra memory use. We save the namespace prefix for the context node and convert it back when we write it.
{}