"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFField.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

FDFField.java  (pdfbox-2.0.23-src):FDFField.java  (pdfbox-2.0.24-src)
skipping to change at line 116 skipping to change at line 116
/** /**
* This will write this element as an XML document. * This will write this element as an XML document.
* *
* @param output The stream to write the xml to. * @param output The stream to write the xml to.
* *
* @throws IOException If there is an error writing the XML. * @throws IOException If there is an error writing the XML.
*/ */
public void writeXML(Writer output) throws IOException public void writeXML(Writer output) throws IOException
{ {
output.write("<field name=\"" + getPartialFieldName() + "\">\n"); output.write("<field name=\"");
output.write(getPartialFieldName());
output.write("\">\n");
Object value = getValue(); Object value = getValue();
if (value instanceof String) if (value instanceof String)
{ {
output.write("<value>" + escapeXML((String) value) + "</value>\n"); output.write("<value>");
output.write(escapeXML((String) value));
output.write("</value>\n");
} }
else if (value instanceof List) else if (value instanceof List)
{ {
List<String> items = (List<String>) value; List<String> items = (List<String>) value;
for (String item : items) for (String item : items)
{ {
output.write("<value>" + escapeXML(item) + "</value>\n"); output.write("<value>");
output.write(escapeXML(item));
output.write("</value>\n");
} }
} }
String rt = getRichText(); String rt = getRichText();
if (rt != null) if (rt != null)
{ {
output.write("<value-richtext>" + escapeXML(rt) + "</value-richtext> output.write("<value-richtext>");
\n"); output.write(escapeXML(rt));
output.write("</value-richtext>\n");
} }
List<FDFField> kids = getKids(); List<FDFField> kids = getKids();
if (kids != null) if (kids != null)
{ {
for (FDFField kid : kids) for (FDFField kid : kids)
{ {
kid.writeXML(output); kid.writeXML(output);
} }
} }
output.write("</field>\n"); output.write("</field>\n");
 End of changes. 4 change blocks. 
5 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)