Code example for Element

Methods: setAttributesetTextContent

0
	 
	private void CreateDocCompareItem( Element docItem, CompareItem cmpItem )
	{ 
		if ( !cmpItem.IsEmpty() )
		{ 
			docItem.setTextContent( cmpItem.GetFileName() );
			docItem.setAttribute( "empty", "false" );
			docItem.setAttribute( "dir", cmpItem.GetFile().isDirectory() ? "true" : "false" );
			docItem.setAttribute( "equal", cmpItem.IsEqualToOpposite() ? "true" : "false" );
			docItem.setAttribute( "unique", cmpItem.IsUnique() ? "true" : "false" );
		} 
		else 
		{ 
			docItem.setTextContent( "" );
			docItem.setAttribute( "empty", "true" );
		} 
	} 
	 
	private void CreateDocCompareItems( Document doc, Element root )
	{ 
Connect your IDE to all the code out there  Get Codota for Java