diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-10-25 13:49:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-10-25 13:50:33 +0100 |
commit | 04c5a36ab8d514cfbe8e40f4493787b2ab392ab5 (patch) | |
tree | 879980892d639a33877e655becfe00ba7faaf20e /reportbuilder | |
parent | db02967f36ec7ac333f1564c7cd10f8a833e1927 (diff) |
avoid using com.sun.org apis
Diffstat (limited to 'reportbuilder')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java index cdc8eae1b73b..ef99a1559f58 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java @@ -41,7 +41,6 @@ import com.sun.star.report.pentaho.model.OfficeStyles; import com.sun.star.report.pentaho.model.OfficeStylesCollection; import com.sun.star.report.pentaho.styles.LengthCalculator; import com.sun.star.report.pentaho.styles.StyleMapper; -import com.sun.org.apache.xerces.internal.parsers.DOMParser; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.transform.OutputKeys; @@ -49,6 +48,8 @@ import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -1058,9 +1059,10 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget try { inputStream = getInputRepository().createInputStream("meta.xml"); - DOMParser dOMParser = new DOMParser(); - dOMParser.parse(new InputSource(inputStream)); - Document document = dOMParser.getDocument(); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document document = dBuilder.parse(new InputSource(inputStream)); + NodeList nl = document.getElementsByTagName("document-meta/meta/generator"); Node node = document.getFirstChild().getFirstChild().getFirstChild().getFirstChild(); String creator = node.getNodeValue(); |