Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 149500

Summary: XML report generates invalid XML fragments
Product: z_Archived Reporter: amehrega
Component: TPTPAssignee: Cindy Jin <jx_china>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: apnan, ewchan, paulslau
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch file
none
patch file none

Description amehrega CLA 2006-07-03 18:17:18 EDT
When I generate an XML report using the code coverage view, I get attribute names that can’t be parsed.

Here's the content of the report:

<?xml version="1.0" encoding="UTF-8"?>
<View name="Coverage Statistics - StartStop at ciscotp [ PID: 3152 ]  (Filter: No filter )">
<data Item_names="&lt;--Summary--&gt;" Calls="4" Methods_missed="0" Methods_hit="4" %_Methods_Hit="100.00%">
  <data Item_names="(default package)" Calls="4" Methods_missed="0" Methods_hit="4" %_Methods_Hit="100.00%"/>
  <data Item_names="java.lang" Calls="0" Methods_missed="0" Methods_hit="0" %_Methods_Hit="0.00%"/>
</data>
</View>


The SAX parser complains about the attribute name: %_Methods_Hit
Comment 1 Eugene Chan CLA 2006-10-19 17:51:27 EDT
mass update:
retarget from 4.3 to 4.4. Cannot be contained in 4.3 due to resource limtation.
Comment 2 Eugene Chan CLA 2007-01-18 15:55:21 EST
*** Bug 170971 has been marked as a duplicate of this bug. ***
Comment 3 Cindy Jin CLA 2007-02-08 11:29:26 EST
Please assign to me
Comment 4 Eugene Chan CLA 2007-02-08 11:35:39 EST
Reassign to Cindy as discussed.
Comment 5 Cindy Jin CLA 2007-03-01 10:24:20 EST
change the attribute name from %_Methods_Hit to 
<?xml version="1.0" encoding="UTF-8"?>
<View name="Coverage Statistics - mypackage.HelloWorld at cindyj2 [ PID: 2636 ]  (Filter: Default Filter )">
<data Item_names="&lt;--Summary--&gt;" Calls="20" Methods_missed="0" Methods_hit="20" Percentage_Methods_Hit="100.00%">
  <data Item_names="mypackage" Calls="2" Methods_missed="0" Methods_hit="2" Percentage_Methods_Hit="100.00%"/>
   
</data>
</View>
Comment 6 Cindy Jin CLA 2007-03-01 10:25:02 EST
Created attachment 60074 [details]
patch file
Comment 7 Cindy Jin CLA 2007-03-01 10:25:16 EST
Created attachment 60075 [details]
patch file
Comment 8 Cindy Jin CLA 2007-03-01 10:27:05 EST
Eugene, please review the patch and help me check in to cvs.

Thanks
Comment 9 Eugene Chan CLA 2007-03-01 11:03:52 EST
Patch is committed.

Thanks Cindy
Comment 10 Cindy Jin CLA 2007-03-12 11:41:45 EDT
verified in build TPTP-4.4.0-200703090100
Comment 11 Liz Dancy CLA 2007-04-04 11:04:06 EDT
I am still getting a complaint about the XML fragment being invalid in after producing this report (same as Ali). Although the %_ is gone, the error message from the SAX parser reads: junit.framework.AssertionFailedError: Error parsing the XML document passed in: Element type "data" must be followed by either attribute specifications, ">" or "/>". This is failing one test case in the Platform.UI.Report test suite (automated).
	
Comment 12 Liz Dancy CLA 2007-04-16 12:13:24 EDT
My mistake, this has been resolved. The configuration I was using was older and had not yet picked up the change.
Comment 13 Paul Slauenwhite CLA 2007-06-02 14:51:43 EDT
Reporter: Please verify and close in preparation for shutting down the TPTP 4.4 release.  Thanks.
Comment 14 amehrega CLA 2007-06-28 16:13:30 EDT
Closing