{"action":"created","issue":{"url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/issues/88","repository_url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe","labels_url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/issues/88/comments","events_url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/issues/88/events","html_url":"https://github.com/Samuel-Oliveira/Java_NFe/issues/88","id":338702998,"node_id":"MDU6SXNzdWUzMzg3MDI5OTg=","number":88,"title":"Criar arquivo xml ","user":{"login":"egioncpdsi","id":19985109,"node_id":"MDQ6VXNlcjE5OTg1MTA5","avatar_url":"https://avatars1.githubusercontent.com/u/19985109?v=4","gravatar_id":"","url":"https://api.github.com/users/egioncpdsi","html_url":"https://github.com/egioncpdsi","followers_url":"https://api.github.com/users/egioncpdsi/followers","following_url":"https://api.github.com/users/egioncpdsi/following{/other_user}","gists_url":"https://api.github.com/users/egioncpdsi/gists{/gist_id}","starred_url":"https://api.github.com/users/egioncpdsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egioncpdsi/subscriptions","organizations_url":"https://api.github.com/users/egioncpdsi/orgs","repos_url":"https://api.github.com/users/egioncpdsi/repos","events_url":"https://api.github.com/users/egioncpdsi/events{/privacy}","received_events_url":"https://api.github.com/users/egioncpdsi/received_events","type":"User","site_admin":false},"labels":[{"id":447747718,"node_id":"MDU6TGFiZWw0NDc3NDc3MTg=","url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":{"login":"Samuel-Oliveira","id":22372310,"node_id":"MDQ6VXNlcjIyMzcyMzEw","avatar_url":"https://avatars1.githubusercontent.com/u/22372310?v=4","gravatar_id":"","url":"https://api.github.com/users/Samuel-Oliveira","html_url":"https://github.com/Samuel-Oliveira","followers_url":"https://api.github.com/users/Samuel-Oliveira/followers","following_url":"https://api.github.com/users/Samuel-Oliveira/following{/other_user}","gists_url":"https://api.github.com/users/Samuel-Oliveira/gists{/gist_id}","starred_url":"https://api.github.com/users/Samuel-Oliveira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samuel-Oliveira/subscriptions","organizations_url":"https://api.github.com/users/Samuel-Oliveira/orgs","repos_url":"https://api.github.com/users/Samuel-Oliveira/repos","events_url":"https://api.github.com/users/Samuel-Oliveira/events{/privacy}","received_events_url":"https://api.github.com/users/Samuel-Oliveira/received_events","type":"User","site_admin":false},"assignees":[{"login":"Samuel-Oliveira","id":22372310,"node_id":"MDQ6VXNlcjIyMzcyMzEw","avatar_url":"https://avatars1.githubusercontent.com/u/22372310?v=4","gravatar_id":"","url":"https://api.github.com/users/Samuel-Oliveira","html_url":"https://github.com/Samuel-Oliveira","followers_url":"https://api.github.com/users/Samuel-Oliveira/followers","following_url":"https://api.github.com/users/Samuel-Oliveira/following{/other_user}","gists_url":"https://api.github.com/users/Samuel-Oliveira/gists{/gist_id}","starred_url":"https://api.github.com/users/Samuel-Oliveira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samuel-Oliveira/subscriptions","organizations_url":"https://api.github.com/users/Samuel-Oliveira/orgs","repos_url":"https://api.github.com/users/Samuel-Oliveira/repos","events_url":"https://api.github.com/users/Samuel-Oliveira/events{/privacy}","received_events_url":"https://api.github.com/users/Samuel-Oliveira/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-05T19:45:45Z","updated_at":"2018-07-05T19:51:56Z","closed_at":null,"author_association":"NONE","body":"Olá Samuel tudo bem ? Procurei aqui pelos issues e não encontrei, tem alguma função na api pra fazer um arquivo xml a partir de um objeto Nfe ? \r\nDesde já Agradeço pela paciência "},"comment":{"url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/issues/comments/402833972","html_url":"https://github.com/Samuel-Oliveira/Java_NFe/issues/88#issuecomment-402833972","issue_url":"https://api.github.com/repos/Samuel-Oliveira/Java_NFe/issues/88","id":402833972,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjgzMzk3Mg==","user":{"login":"Samuel-Oliveira","id":22372310,"node_id":"MDQ6VXNlcjIyMzcyMzEw","avatar_url":"https://avatars1.githubusercontent.com/u/22372310?v=4","gravatar_id":"","url":"https://api.github.com/users/Samuel-Oliveira","html_url":"https://github.com/Samuel-Oliveira","followers_url":"https://api.github.com/users/Samuel-Oliveira/followers","following_url":"https://api.github.com/users/Samuel-Oliveira/following{/other_user}","gists_url":"https://api.github.com/users/Samuel-Oliveira/gists{/gist_id}","starred_url":"https://api.github.com/users/Samuel-Oliveira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samuel-Oliveira/subscriptions","organizations_url":"https://api.github.com/users/Samuel-Oliveira/orgs","repos_url":"https://api.github.com/users/Samuel-Oliveira/repos","events_url":"https://api.github.com/users/Samuel-Oliveira/events{/privacy}","received_events_url":"https://api.github.com/users/Samuel-Oliveira/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T19:51:56Z","updated_at":"2018-07-05T19:51:56Z","author_association":"OWNER","body":"Beleza?\r\nPara Tranformar os Objetos  em xml (String) use o XmlUtil.objectToXml.\r\n\r\nAgora para gerar arquivo, é algo muito relacionado a regra de negocio.\r\nEntão tudo que é mt especifico não vai para API, assim como impressão.\r\nComo cada um faz diferente não compensa manter.\r\nMas deixo aqui um exemplo de uma método que grava arquivo:\r\n\r\n /**\r\n     * Cria um arquivo com os dados passados\r\n     */\r\n    public static void criarPastaArquivo(String pasta, String arquivo, String conteudo){\r\n\r\n        File folder = new File(pasta);\r\n        if(!folder.exists()){\r\n            folder.mkdirs();\r\n        }\r\n\r\n        FileWriter fileWriter;\r\n        try {\r\n            fileWriter = new FileWriter(new File(pasta+\"/\"+arquivo));\r\n            fileWriter.write(conteudo);\r\n            fileWriter.close();\r\n        } catch (Exception e) {\r\n            TRatar erro aqui\r\n        }\r\n    } \r\n\r\n\r\nCaso tenha resolvido a duvida por favor feche a Issue!"}}
{"actor":{"display_login":"Samuel-Oliveira"}}