StringBuilder stringBuilder;
public void elementStarted( final StartElement _startElement, final Map<QName, ElementListener> _handlers )
{
this.stringBuilder = new StringBuilder();
_handlers.put( XMLConstants.Text.S, new ElementHandler()
{
@SuppressWarnings( "unqualified-field-access" )
@Override
public void elementStarted( final StartElement _startElement, final Map<QName, ElementListener> _handlers )
{
final int count;
final Attribute attribute = _startElement.getAttributeByName( XMLConstants.Text.C );
if (attribute != null) {
count = Integer.parseInt( attribute.getValue() );
}
else {
count = 1;
}
for (int i = 0; i < count; i++) {
stringBuilder.append( " " );
}
}
} );
_handlers.put( XMLConstants.Text.TAB, new ElementHandler()
{
@SuppressWarnings( "unqualified-field-access" )
@Override
public void elementStarted( final StartElement _startElement, final Map<QName, ElementListener> _handlers )
{