Module: REXML

Defined in:
lib/rexml/rexml.rb,
lib/rexml/text.rb,
lib/rexml/node.rb,
lib/rexml/xpath.rb,
lib/rexml/cdata.rb,
lib/rexml/child.rb,
lib/rexml/output.rb,
lib/rexml/source.rb,
lib/rexml/parent.rb,
lib/rexml/entity.rb,
lib/rexml/doctype.rb,
lib/rexml/dtd/dtd.rb,
lib/rexml/comment.rb,
lib/rexml/xmldecl.rb,
lib/rexml/element.rb,
lib/rexml/document.rb,
lib/rexml/encoding.rb,
lib/rexml/functions.rb,
lib/rexml/xmltokens.rb,
lib/rexml/namespace.rb,
lib/rexml/quickpath.rb,
lib/rexml/attribute.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/streamlistener.rb,
lib/rexml/syncenumerator.rb,
lib/rexml/parseexception.rb,
lib/rexml/dtd/entitydecl.rb,
lib/rexml/dtd/elementdecl.rb,
lib/rexml/dtd/attlistdecl.rb,
lib/rexml/dtd/notationdecl.rb,
lib/rexml/formatters/pretty.rb,
lib/rexml/validation/relaxng.rb,
lib/rexml/formatters/default.rb,
lib/rexml/parsers/sax2parser.rb,
lib/rexml/parsers/pullparser.rb,
lib/rexml/parsers/treeparser.rb,
lib/rexml/parsers/baseparser.rb,
lib/rexml/parsers/xpathparser.rb,
lib/rexml/parsers/lightparser.rb,
lib/rexml/parsers/streamparser.rb,
lib/rexml/validation/validation.rb,
lib/rexml/formatters/transitive.rb,
lib/rexml/parsers/ultralightparser.rb,
lib/rexml/undefinednamespaceexception.rb,
lib/rexml/validation/validationexception.rb

Overview

a = Node.new a << “B” # => <a>B</a> a.b # => <a>B<b/></a> a.b # => <a>B<b/><b/><a> a.b[“x”] = “y” # => <a>B<b/><b x=“y”/></a> a.b.c # => <a>B<c/><b x=“y”/></a> a.b.c << “D” # => <a>B<c>D</c><b x=“y”/></a>

Defined Under Namespace

Modules: DTD, Encoding, EntityConst, Formatters, Functions, Light, Namespace, Node, Parsers, SAX2Listener, 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, Source, SourceFactory, SyncEnumerator, Text, UndefinedNamespaceException, XMLDecl, XPath, XPathParser

Constant Summary collapse

"Copyright © 2001-2008 Sean Russell <ser@germane-software.com>"
DATE =
"2008/019"
VERSION =
"3.1.7.3"
REVISION =
%w$Revision: 26193 $[1] || ''
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.

{}