private String getSingleNodeText(Node node) { return getNormalizedText(node.getNodeValue()); }
private String getSingleNodeText(Node node) { String text = getNormalizedText(node.getNodeValue()); if (!whitespaceNormalized) return text; if (text.length() > 0 && node.getPreviousSibling() == null && isIgnorableWhiteSpace(text.substring(0, 1), true)) return text.substring(1); if (text.length() > 1 && node.getNextSibling() == null && isIgnorableWhiteSpace(text.substring(text.length() - 1), true)) return text.substring(0, text.length() - 1); return text; }
public void parseRegularText(String regularText, boolean convertURLs) { reset(); if (regularText == null) return; regularText = getNormalizedText(regularText); Paragraph p = new Paragraph(true); paragraphs.add(p); int pstart = 0; for (int i = 0; i < regularText.length(); i++) { char c = regularText.charAt(i); if (p == null) { p = new Paragraph(true); paragraphs.add(p); } if (c == '\n') { String text = regularText.substring(pstart, i); pstart = i + 1; p.parseRegularText(text, convertURLs, true, getHyperlinkSettings(), null); p = null; } } if (p != null) { // no new line String text = regularText.substring(pstart); p.parseRegularText(text, convertURLs, true, getHyperlinkSettings(), null); } }
public void parseRegularText(String regularText, boolean convertURLs) { reset(); if (regularText == null) return; regularText = getNormalizedText(regularText); Paragraph p = new Paragraph(true); paragraphs.add(p); int pstart = 0; for (int i = 0; i < regularText.length(); i++) { char c = regularText.charAt(i); if (p == null) { p = new Paragraph(true); paragraphs.add(p); } if (c == '\n') { String text = regularText.substring(pstart, i); pstart = i + 1; p.parseRegularText(text, convertURLs, true, getHyperlinkSettings(), null); p = null; } } if (p != null) { // no new line String text = regularText.substring(pstart); p.parseRegularText(text, convertURLs, true, getHyperlinkSettings(), null); } }
String value = child.getNodeValue(); TextHyperlinkSegment ts = new TextHyperlinkSegment( getNormalizedText(value), settings, null); Node alt = atts.getNamedItem("alt"); //$NON-NLS-1$ if (alt!=null)
String value = child.getNodeValue(); TextHyperlinkSegment ts = new TextHyperlinkSegment( getNormalizedText(value), settings, null); Node alt = atts.getNamedItem("alt"); //$NON-NLS-1$ if (alt!=null)