At a glance
- Syntaxical parser capable of transforming any structured character file into an XML document
- Domain-specific meta-data language describes the expected syntax and drives identifications, validations, extractions and cuts based on Regular expressions
- Java source code; use the Java API or a command line executable in a shell or command script
- build a single .jar file that packs the code with meta-data resources, or keep meta-data separate and integrate the jar as a micro-service
- Perfect complement to XSLT (XML to anything) for mapping anything to XML
- OPEN SOURCE, Apache 2.0 license
An XML document is, by construction, neatly divided into pieces organized as a tree of nodes: element nodes, text nodes, attribute nodes, namespace nodes. When you get a new XML document, the unknowns are names and contents of nodes, but you can trust the cuts, i.e. the tree. In other words, you see first the structure, and then the contents. These features have forged XSLT which is based on XPath expressions (to select nodes) and a hierarchical application of node processing templates.
An arbitrary text document is just the reverse: you see first a melted content, and then you have to discover the cuts to rebuild the structure. With XSLT, the tree is used to build the processing. With a text file, the processing is used to build the tree. That has forged the ReverseXSL Transformer.
Most likely, you had to coordinate three activities:
- understand the details of the message syntax at stake and formalize a representation in code
- deal with the programming language in itself: edit code, build, unit test, debug, add code to handle exceptions
- design and code the logic to deal with optional pieces, repeated blocks, nested structures, conditions, ...
We propose that you drop the last two, and boost your productivity for an even better result!
CSV, EDIFACT, Text, Fixed records, Flat Files, IATA, AHM, SSADM, PSCRM, SWIFT, CEFACT, XML...
May be like many of us, you once thought to use XSLT for a flat-file to XML transformation with the idea that it would be almost as magical as the XML-to-anything developments you formerly achieved. You may have looked for a hidden <xsl:input>(?) method and XSL functions that you haven't used before, and that will hopefully provide the solution but... we have to acknowledge that beside framing your entire file with <tag>..myFile..</tag> and using substring() extensively... ooups!
ReverseXSL software sprouted in 2007 from the failed attempt to find a straight and flexible structured-messages parser that would be affordable, can be learned quickly, and would save us from dozens of interface screens, gigabyte workstation and server software, and hundreds of parameters to configure. Communication platforms existed already, XSLT is widely available, so we just missed a compact yet very flexible tool capable of transforming non-XML data. In particular, it had to digest structured airline messages (IATA IMP, AHM, SSIM...) which, if you know them, bear one of the most screwy syntax of the EDI arena.
You have a screwy flat file to import into your application and you are reluctant to endorse one of the solutions presented so far to you... actually, you fear that there could be more parameters to set-up than data elements in your file!