# Converting EDI files to XML using JAVA

**URL:** <https://techcommunity.softwareag.com/t/converting-edi-files-to-xml-using-java/109828>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [February 21, 2009, 11:57am UTC](https://techcommunity.softwareag.com/t/converting-edi-files-to-xml-using-java/109828 "2009-02-21T11:57:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![au.naveen](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@au.naveen](https://techcommunity.softwareag.com/u/au.naveen)\
**Post date:** [February 21, 2009, 11:57am UTC](https://techcommunity.softwareag.com/t/converting-edi-files-to-xml-using-java/109828/1 "2009-02-21T11:57:50Z")

</div>

hi friends,

```
   I like to create a code generator in java which has to read EDI files and convert that to xml msgs.. I have predefined format for EDI and XML in Java classes.. Is there any in build support in Java for this.. How to Proceed for this..?

```

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [February 21, 2009, 10:19pm UTC](https://techcommunity.softwareag.com/t/converting-edi-files-to-xml-using-java/109828/2 "2009-02-21T22:19:01Z")

</div>

You can try with using documentToXMLString (map EDIValues o/p of converttovalues to document) it should work…

steps:  
convertToValues(i/p-- edidata o/p --EDIValues)  
documentToXMLString (i/p-document,docTypeName(optional) returns o/p–xmldata)

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![au.naveen](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@au.naveen](https://techcommunity.softwareag.com/u/au.naveen)\
**Post date:** [March 16, 2009, 12:33pm UTC](https://techcommunity.softwareag.com/t/converting-edi-files-to-xml-using-java/109828/3 "2009-03-16T12:33:45Z")

</div>

Thanks for spending ur time in replying me… But i like to know in detail about the following… I am having an EDI file… I know its structure(classes and attributes)… Now i have to place those values in java class or in a xml file(anyone will do)… can u explain that in detail

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:05pm UTC](https://techcommunity.softwareag.com/t/converting-edi-files-to-xml-using-java/109828/4 "2021-04-02T15:05:53Z")

</div>


