The autogenerated code produces content in string format for all parameter types including the XML run-time parameter type. However, some network elements require different XML technologies such as document object model (DOM), simple API for XML (SAX), XML beans, and so on. You can create Java code to perform this conversion.
For example, the following sample code loads an XML string parameter into a XML DOM parameter:
public Document buildDocumentFromString(String xmlString) throws Exception { try { StringReader stringReader = new StringReader(xmlString); SAXBuilder builder = new SAXBuilder(); Diagnosis.diag(1, this, "Building document for :\n" + xmlString); Document doc = builder.build(stringReader); return doc; } catch (Exception e) { String exceptionMessage = "Exception caught : " + e.toString(); Diagnosis.diag(1, this, exceptionMessage); throw new Exception("XML Error" + exceptionMessage); } }
Understanding the Java Processor Class
Working with the Action Processor
Creating Activation Run-Time Type Parameters in the Data Dictionary
Understanding Model Element Relationships