Lines Matching refs:output
14 # Writes the node to some output.
18 # output::
20 # change the output encoding.
21 def write( node, output )
25 if node.xml_decl.encoding != 'UTF-8' && !output.kind_of?(Output)
26 output = Output.new( output, node.xml_decl.encoding )
28 write_document( node, output )
31 write_element( node, output )
35 node.write( output,-1 )
38 write_instruction( node, output )
41 node.write( output )
44 write_comment( node, output )
47 write_cdata( node, output )
50 write_text( node, output )
59 def write_document( node, output )
60 node.children.each { |child| write( child, output ) }
63 def write_element( node, output )
64 output << "<#{node.expanded_name}"
69 output << " "
70 attr.write( output )
74 output << " " if @ie_hack
75 output << "/"
77 output << ">"
79 write( child, output )
81 output << "</#{node.expanded_name}"
83 output << ">"
86 def write_text( node, output )
87 output << node.to_s()
90 def write_comment( node, output )
91 output << Comment::START
92 output << node.to_s
93 output << Comment::STOP
96 def write_cdata( node, output )
97 output << CData::START
98 output << node.to_s
99 output << CData::STOP
102 def write_instruction( node, output )
103 output << Instruction::START.sub(/\\/u, '')
104 output << node.target
105 output << ' '
106 output << node.content
107 output << Instruction::STOP.sub(/\\/u, '')