Keeping the DOCTYPE in a XML document

Hi,

Is there a way to keep the DOCTYPE from a XML document?

When I invoke the pub.web:documentToRecord service, I lost the line.

This is a short version of my docuemnt:

<?xml version='1.0' encoding='UTF-8'?> 5

I’m getting my Xml document from a ftp server and I have to do some modification to it before passing it to Trading Network. That’s why I use the pub.web:documentToRecord service.

Is there another way to achieve this?

Thanks for your help

Call pub.web:getDocumentType which will return localRootName=“TEST” and systemID=“test.dtd” for the following:

<?xml version="1.0" encoding="UTF-8"?>

Right a Java service that uses a StringBuffer to append the five bits:

  1. "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE "
  2. localRootName
  3. " SYSTEM “”
  4. systemID
  5. “”>"

Call pub.web:recordToDocument with the addHeader flag set to false and put the String created above on the front.