NEEDS DOCUMENTATION
Methods
    - #
- C
- D
- E
- I
- N
- O
- W
- X
Included Modules
    
  
  
    
    
    
      
      Constants
      | DEFAULT_VERSION | = | "1.0"; | 
| DEFAULT_ENCODING | = | "UTF-8"; | 
| DEFAULT_STANDALONE | = | "no"; | 
| START | = | '<\?xml'; | 
| STOP | = | '\?>'; | 
Attributes
      | [RW] | stand_alone? | |
| [RW] | standalone | |
| [RW] | version | |
| [R] | writeencoding | |
| [R] | writethis | 
Class Public methods
      
        
            
              default()
            
            Link
          
          
          
            Only use this if you do not want the XML declaration to be written; this object is ignored by the XML writer. Otherwise, instantiate your own XMLDecl and add it to the document.
Note that XML 1.1 documents must include an XML declaration
            
              new(version=DEFAULT_VERSION, encoding=nil, standalone=nil)
            
            Link
          
          
          
            # File ../ruby/lib/rexml/xmldecl.rb, line 18 def initialize(version=DEFAULT_VERSION, encoding=nil, standalone=nil) @writethis = true @writeencoding = !encoding.nil? if version.kind_of? XMLDecl super() @version = version.version self.encoding = version.encoding @writeencoding = version.writeencoding @standalone = version.standalone else super() @version = version self.encoding = encoding @standalone = standalone end @version = DEFAULT_VERSION if @version.nil? end
Instance Public methods
      
        
            
              ==( other )
            
            Link
          
          
          
            
            
              clone()
            
            Link
          
          
          
            
            
              dowrite()
            
            Link
          
          
          
            
            
              inspect()
            
            Link
          
          
          
            
            
              node_type()
            
            Link
          
          
          
            
            
              nowrite()
            
            Link
          
          
          
            
            
              write(writer, indent=-1, transitive=false, ie_hack=false)
            
            Link
          
          
          
            - indent
- 
Ignored. There must be no whitespace before an XML declaration 
- transitive
- 
Ignored 
- ie_hack
- 
Ignored 
# File ../ruby/lib/rexml/xmldecl.rb, line 46 def write(writer, indent=-1, transitive=false, ie_hack=false) return nil unless @writethis or writer.kind_of? Output writer << START.sub(/\/u, '') if writer.kind_of? Output writer << " #{content writer.encoding}" else writer << " #{content encoding}" end writer << STOP.sub(/\/u, '') end
            
              xmldecl(version, encoding, standalone)
            
            Link
          
          
          
            Instance Private methods