Method: WirisPlugin::XmlWriter#startElement

Defined in:
lib/com/wiris/util/xml/XmlWriter.rb

#startElement(uri, localName, qName, atts) ⇒ Object



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/com/wiris/util/xml/XmlWriter.rb', line 96

def startElement(uri, localName, qName, atts)
    closeOpenTag(false)
    processWhiteSpace(@isInline || !(@autoIgnoringWhitespace || @prettyPrint))
    if @prettyPrint && !@isInline
        writeIndent()
    end
    name = qName
    if (name == nil) || (name::length() == 0)
        name = localName
    end
    write("<" + name)
    writeAttributes(atts)
    if @nameSpace != nil
        write(@nameSpace::toString())
        @nameSpace = nil
    end
    @tagOpen = true
    if !@isInline && @inlineElements::contains_(name)
        @inlineMark = @depth
        @isInline = true
    end
    @depth+=1
end