Results for: "partition"

Creates a shallow copy of self.

d = Document.new "<a><b/><b/><c><d/></c></a>"
new_a = d.root.clone
puts new_a  # => "<a/>"
No documentation available

Evaluates to the URI for a prefix, or the empty string if no such namespace is declared for this element. Evaluates recursively for ancestors. Returns the default namespace, if there is one.

prefix

the prefix to search for. If not supplied, returns the default namespace if one exists

Returns

the namespace URI as a String, or nil if no such namespace exists. If the namespace is undefined, returns an empty string

doc = Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
b = doc.elements['//b']
b.namespace           # -> '1'
b.namespace("y")      # -> '2'
No documentation available

DEPRECATED

See REXML::Formatters

Writes out this element, and recursively, all children.

output

output an object which supports ‘<< string’; this is where the

document will be written.
indent

An integer. If -1, no indenting will be used; otherwise, the indentation will be this number of spaces, and children will be indented an additional amount. Defaults to -1

transitive

If transitive is true and indent is >= 0, then the output will be pretty-printed in such a way that the added whitespace does not affect the parse tree of the document

ie_hack

This hack inserts a space before the /> on empty tags to address a limitation of Internet Explorer. Defaults to false

out = ''
doc.write( out )     #-> doc is written to the string 'out'
doc.write( $stdout ) #-> doc written to the console

Private helper class. Removes quotes from quoted strings

No documentation available

Write out a fully formed, correct entity definition (assuming the Entity object itself is valid.)

out

An object implementing &lt;&lt; to which the entity will be output

indent

DEPRECATED and ignored

No documentation available

DEPRECATED

See the rexml/formatters package

No documentation available
No documentation available
No documentation available
No documentation available

DEPRECATED

See REXML::Formatters

FIXME This probably won’t work properly

No documentation available
No documentation available
indent

Ignored. There must be no whitespace before an XML declaration

transitive

Ignored

ie_hack

Ignored

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Reorders an array of nodes so that they are in document order It tries to do this efficiently.

FIXME: I need to get rid of this, but the issue is that most of the XPath interpreter functions as a filter, which means that we lose context going in and out of function calls. If I knew what the index of the nodes was, I wouldn’t have to do this. Maybe add a document IDX for each node? Problems with mutable documents. Or, rewrite everything.

Search took: 5ms  ·  Total Results: 3199