Package org.brerp.sped.nfe.util
Class XMLUtil
java.lang.Object
org.brerp.sped.nfe.util.XMLUtil
XML Util
- Version:
- $Id: XMLUtil.java, v1.0 2012/05/20 5:10:45 PM, ralexsander Exp $
- Author:
- Ricardo Santana (Kenos, www.kenos.com.br)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getElement
(Document document, int index, String value) Get the result of XML nodestatic String
getElement
(Document document, String value) Get the result of XML nodestatic String
getElement
(NodeList nl, int index, String value) Get the result of XML nodestatic String
getElement
(NodeList nl, String value) Get the result of XML nodestatic BigDecimal
getElementAsBD
(Document document, int index, String value) Get the result of XML nodestatic BigDecimal
getElementAsBD
(Document document, String value) Get the result of XML nodestatic BigDecimal
getElementAsBD
(NodeList nl, int index, String value) Get the result of XML nodestatic BigDecimal
getElementAsBD
(NodeList nl, String value) Get the result of XML nodestatic boolean
getElementAsBool
(Document document, String value) Get the result of XML nodestatic boolean
getElementAsBool
(Document document, String value, boolean defValue) Get the result of XML nodestatic boolean
getElementAsBool
(Document document, String value, int index, boolean defValue) Get the result of XML nodestatic int
getElementAsInt
(Document document, int index, String value) Get the int value of XML nodestatic int
getElementAsInt
(Document document, String value) Get the int value of XML nodestatic int
getElementAsInt
(NodeList nl, int index, String value) Get the int value of XML nodestatic int
getElementAsInt
(NodeList nl, String value) Get the int value of XML nodestatic net.sf.jasperreports.engine.JasperPrint
Cria o JasperPrint a Partir de um XML.static File
getParametersDanfe
(MLBRDocFiscal df, File jasper) Preenche os ParĂ¢metros da DANFe Frente msgVersaoTeste PreImpresso msgPrevisualizacaostatic File
static String
printDANFe
(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, PrintInfo printInfo) Imprime a DANFe a partir de um JasperPrintstatic String
printDANFe
(net.sf.jasperreports.engine.JasperPrint jasperPrint, PrintInfo printInfo) Imprime a DANFe a partir de um JasperPrint
-
Constructor Details
-
XMLUtil
public XMLUtil()
-
-
Method Details
-
getElementAsInt
Get the int value of XML node- Parameters:
doc
-- Returns:
- 0 or int value
-
getElementAsInt
Get the int value of XML node- Parameters:
doc
-- Returns:
- 0 or int value
-
getElementAsBool
Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElementAsBool
Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElementAsBool
public static boolean getElementAsBool(Document document, String value, int index, boolean defValue) Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElementAsBD
Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElementAsBD
Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc
-index
-value
-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc
-index
-value
-- Returns:
- "" or result
-
getElementAsInt
Get the int value of XML node- Parameters:
doc
-- Returns:
- 0 or int value
-
getElementAsInt
Get the int value of XML node- Parameters:
doc
-- Returns:
- 0 or int value
-
getElementAsBD
Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElementAsBD
Get the result of XML node- Parameters:
doc
-value
-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc
-index
-value
-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc
-index
-value
-- Returns:
- "" or result
-
printDANFe
public static String printDANFe(net.sf.jasperreports.engine.JasperPrint jasperPrint, PrintInfo printInfo) throws IOException, net.sf.jasperreports.engine.JRException Imprime a DANFe a partir de um JasperPrint- Parameters:
jasperPrint
-- Returns:
- Throws:
IOException
net.sf.jasperreports.engine.JRException
-
printDANFe
public static String printDANFe(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, PrintInfo printInfo) throws IOException, net.sf.jasperreports.engine.JRException Imprime a DANFe a partir de um JasperPrint- Parameters:
jasperPrint
-- Returns:
- Throws:
IOException
net.sf.jasperreports.engine.JRException
-
getJasperPrint
public static net.sf.jasperreports.engine.JasperPrint getJasperPrint(Map<String, Object> parameters, File xmlNF, File jasperFile) throws net.sf.jasperreports.engine.JRException, AdempiereException, IOExceptionCria o JasperPrint a Partir de um XML.- Parameters:
parameters
-xmlNF
-jasperFile
-- Returns:
- Throws:
net.sf.jasperreports.engine.JRException
AdempiereException
IOException
-
getParametersDanfe
Preenche os ParĂ¢metros da DANFe Frente msgVersaoTeste PreImpresso msgPrevisualizacao- Returns:
-
getPDF
public static File getPDF(net.sf.jasperreports.engine.JasperPrint jasperPrint, String fileName) throws IOException, net.sf.jasperreports.engine.JRException - Throws:
IOException
net.sf.jasperreports.engine.JRException
-
getLotPDF
public static File getLotPDF(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, String fileName) throws IOException, net.sf.jasperreports.engine.JRException - Throws:
IOException
net.sf.jasperreports.engine.JRException
-