XMLCommand theCommand = new XMLCommand(XMLCommand.SaveDocument, XMLCommand.SaveDocument_Save, docNumber, xmlToInsert, thePne, thePnce, theLock);
String result = "";
result = XMLCommand(connection, theDb, theCommand.toString());
int newNrecord = Integer.parseInt(XMLCommand.getDval(result, "ndoc"));
if (result.indexOf("dtl") == -1) {
throw new XWException("An Error occurred while processing insert");
}
return newNrecord;
}