src/main/java/eu/digitisation/text/Text.java
private void readFR10Par(Element par) throws WarningException {
        NodeList lines = par.getElementsByTagName("line");
        for (int nline = 0; nline < lines.getLength(); ++nline) {
            Element line = (Element) lines.item(nline);
            StringBuilder text = new StringBuilder();
            NodeList formattings = line.getElementsByTagName("formatting");
            for (int nform = 0; nform < formattings.getLength(); ++nform) {
                Element formatting = (Element) formattings.item(nform);
                NodeList charParams = formatting.getElementsByTagName("charParams");
                for (int nchar = 0; nchar < charParams.getLength(); ++nchar) {
                    Element charParam = (Element) charParams.item(nchar);
                    String content = charParam.getTextContent();
                    if (content.length() > 0) {
                        text.append(content);
                    } else {
                        text.append(' ');
                    }
                }
            }
            add(text.toString());
        }
    }
/**
     * Reads textual content from FR10 XML paragraph
     *
     * @param par the paragraph (par) element
     */
Reads textual content from FR10 XML paragraph
@param par the paragraph (par) element
Reads textual content from FR10 XML paragraph @param par the paragraph ( par ) element
private void readFR10Par(Element par) throws WarningException {
        NodeList lines = par.getElementsByTagName("line");
        for (int nline = 0; nline < lines.getLength(); ++nline) {
            Element line = (Element) lines.item(nline);
            StringBuilder text = new StringBuilder();
            NodeList formattings = line.getElementsByTagName("formatting");
            for (int nform = 0; nform < formattings.getLength(); ++nform) {
                Element formatting = (Element) formattings.item(nform);
                NodeList charParams = formatting.getElementsByTagName("charParams");
                for (int nchar = 0; nchar < charParams.getLength(); ++nchar) {
                    Element charParam = (Element) charParams.item(nchar);
                    String content = charParam.getTextContent();
                    if (content.length() > 0) {
                        text.append(content);
                    } else {
                        text.append(' ');
                    }
                }
            }
            add(text.toString());
        }
    }
private void readFR10Par ( Element par ) throws WarningException { NodeList lines = par . getElementsByTagName ( "line" ) ; for ( int nline = 0 ; nline < lines . getLength ( ) ; ++ nline ) { Element line = ( Element ) lines . item ( nline ) ; StringBuilder text = new StringBuilder ( ) ; NodeList formattings = line . getElementsByTagName ( "formatting" ) ; for ( int nform = 0 ; nform < formattings . getLength ( ) ; ++ nform ) { Element formatting = ( Element ) formattings . item ( nform ) ; NodeList charParams = formatting . getElementsByTagName ( "charParams" ) ; for ( int nchar = 0 ; nchar < charParams . getLength ( ) ; ++ nchar ) { Element charParam = ( Element ) charParams . item ( nchar ) ; String content = charParam . getTextContent ( ) ; if ( content . length ( ) > 0 ) { text . append ( content ) ; } else { text . append ( ' ' ) ; } } } add ( text . toString ( ) ) ; } }
Reads textual content from FR10 XML paragraph
 @param par the paragraph (par) element
Reads textual content from FR10 XML paragraph @param par the paragraph ( par ) element