Namespace par1 = Namespace.getNamespace("http://www.w3.org/2001/XMLSchema-instance");
Element InfNfe = new Element("infNFe",par1);InfNfe.setAttribute("Id","NFe35090699999090910270550010000000020300"+nota.getText());InfNfe.setAttribute("versao","1.10");
O resultado sai assim:
- <infNFe xmlns="http://www.w3.org/2001/XMLSchema-instance" Id="NFe35090699999090910270550010000000020300015171" versao="1.10">
mas o certo é com :xsi:
- <infNFe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="NFe35090699999090910270550010000000020300015171" versao="1.10">
se algume poder ajudar agradeco!