My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Customer  
Updated Jun 15, 2009 by conrad.w...@gmail.com
package asaxb.demo
{
	
	[XmlRootNode(name='customer')]
	public class Customer
	{
		
		[XmlElement(name='name')]
		public var name:String;

		[XmlElement(name='telephone')]
		public var telephone:String;

		[XmlElement(name='address')]
		public var address:String;
		
	}
}
Comment by JieGa...@gmail.com, Mar 5, 2010

What steps will reproduce the problem? 1. createMarshaller 2. marshaller.marshal(obj) 3. xml.toXMLString().replace(reg,"")

What is the expected output? What do you see instead? if the attribute containing in Object is null or no value,we see attribute showing null value in the XML such as:"...<host comment="null" starttime="1267855041" endtime="1267855043">..." instead of not showing the attribute.

What version of the product are you using? On what operating system? we use the latest version

Please provide any additional information below.

we are not expected to see null value for relevant attribute. if the value is null, attribute should not be appended in the XML. Therefore,the example listed above should be:"...<host starttime="1267855041" endtime="1267855043">..." without attribute "comment".

Comment by JieGa...@gmail.com, Mar 6, 2010

if the value of telephone or address is null,then marshal the object.In this circumstance, we would get the xml with the relevant attributes holding the null value. How could we avoid this kind of problem? what should we do ? Any solution? I suppose in most cases ,we would not be expected to see the attribute appended into the XML as the value is null.


Sign in to add a comment
Powered by Google Project Hosting