Hi there all :)

We are using xmlbeans in webservices with xfire and are sending quite 
large xmldocuments back and forth between the layers. 

Our problem is that the namepace declarations take up almost the same 
amount of space (in the sent xml file) as the actual data. This is due to 
the fact that each element declares it's namespace, not using what might 
have been declared allready by it's parentnodes. To remove these unwanted 
declarations, we do a :

FindAgreementsResponseDocument.Factory.parse(findAgreementsResponseDocument.newReader(getXmlOptions()))
 


where the Xmloptions are 

xmlOpt.setSaveAggressiveNamespaces();
xmlOpt.setSaveNamespacesFirst();

This forces (as I have understood the documentation) a double loop through 
the entire xml structure to first find all namespaces, and then to update 
all instances with the new ones. This gives us quite a performance hit 
both on memory and on cpu time. 

Is there any way to set on the documentinstance which namespaces we are 
going to use and use them when i call i.e. 
findAgreementsResponseDocument.addNewAgreement().

This would solve both the xmlsize problem and the performance hit on the 
xmlOptions approach. 

Is there any such way to solve this, or is the xmlOptions the only way?

Thanks in advance.

mvh
Knut-Erik Johnsen


*********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity whom they
are addressed. If you have received this email in error please notify
the system manager.
  
This footnote also confirms that this email message has been swept
for the presence of computer viruses.
  
*********************************************************************

Reply via email to