Code example for XmlSerializer

Methods: attribute, endDocument, endTag, startTag

0
			 
//			xmlSerializer.setOutput(xmlReportContent); 
			// start DOCUMENT 
//			xmlSerializer.startDocument("UTF-8", true);			 
			//XML content 
			xmlSerializer.startTag("", "testSuite");
			xmlSerializer.startTag("", "testCase");
			xmlSerializer.attribute("", "title", testCaseTitle);						
			addTestCaseData(expectedValue, resultValue, testCaseTitle, testResult);			
			xmlSerializer.endTag("", "testCase");	
			xmlSerializer.endTag("", "testSuite");			
		    // end DOCUMENT 
		    xmlSerializer.endDocument();
		} catch (IllegalArgumentException e) {
			Log.e(TAG,"Error creating XML file IllegalArgumentException " + e.toString());
		} catch (IllegalStateException e) {
			Log.e(TAG,"Error creating XML fileIllegalStateException" + e.toString());
		} catch (IOException e) {
			Log.e(TAG,"Error creating XML file " + e.toString());
		}