if (getInputResultPath().length() == 0) {
if (getInputRow() instanceof XMLRecord) {
dom = (Element)((XMLRecord)getInputRow()).getDOM();
// Rename the root element if specified to be different.
if (!dom.getTagName().equals(getInputRootElementName())) {
XMLRecord parameterRow = createXMLRecord(getInputRootElementName());
parameterRow.put("/" + getInputRootElementName(), getInputRow());
dom = (Element)parameterRow.getDOM();
}
} else {
XMLRecord parameterRow = createXMLRecord(getInputRootElementName());
for (int index = 0; index < getInputRow().size(); index++) {
parameterRow.put(getInputRow().getFields().elementAt(index), getInputRow().getValues().elementAt(index));
}
dom = (Element)parameterRow.getDOM();
}
} else {
XMLRecord parameterRow = createXMLRecord(getInputRootElementName());
parameterRow.put(getInputResultPath(), getInputRow());
dom = (Element)parameterRow.getDOM();
}
} else {
XMLRecord parameterRow = createXMLRecord(getInputRootElementName());
for (int index = 0; index < getArgumentNames().size(); index++) {
String parameterName = (String)getArgumentNames().get(index);
Object parameter = getParameters().get(index);
// If no arguments were passed to the call execution find the paramter from the row.
if ((parameter == null) && (getInputRow() != null)) {
parameter = getInputRow().get(parameterName);
}
parameterRow.put(parameterName, parameter);
}
dom = (Element)parameterRow.getDOM();
}
return dom;
}