I'm using the JCo API in conjunction with the IDoc Class Library and am trying to find out how to get a textual flat file representation of an IDocDocument instance. It's easy produce an XML representation using the IDocXMLProcessor, e.g.:
public String getIDocAsText( IDocDocument doc )
{
return JCoIDoc.getIDocFactory().getIDocXMLProcessor().render( doc );
}
I also need to be able to parse the textual representation of an IDoc back into an IDocDocument. Again, this is simple to do with the XML representation. e.g.:
public IDocDocument getIDocFromText( IDocRepository repo, String idocXML )
throws IDocParseException
{
return JCoIDoc.getIDocFactory().getIDocXMLProcessor().parse(
repo, idocXML ).get( 0 );
}
However, I need to this with the tradtional (i.e. non-XML) representation; can anyone give me some pointers as to how this can be acheived?
The most promising lead I've found is this How-To:
However, I need to do this purely in Java.
Kind regards and thanks in advance for yout time,
Jon