I have a web service which returns an XML file like this:\[code\] <Service> <id>12</id> <function_code>2</function_code> <cf>AABBBCCCAAA</cf> <active>0</active> <option>resume_state</option> </Service> \[/code\]In many case the element may be not returned, and the XML will be:\[code\] <Service> <id>12</id> <function_code>2</function_code> <cf>AABBBCCCAAA</cf> <active>0</active> <option/> </Service> \[/code\]I'm parsing this element with the following code:\[code\] String id = response.getProperty("cf").toString(); String func= response.getProperty("function_code").toString(); int active = Integer.parseInt(response.getProperty("active").toString(); String option = response.getProperty("option").toString();\[/code\]where response is SoapObject.In this situation, when I try to print the option String on error line:\[code\] System.err.println("my option variable contains: "+option);\[/code\]The result is:\[code\] my option variable contains anyType{}\[/code\]Why? And what can I do for parsing the option string obtaining null value if the option element is void () ?