Edgewall Software
Modify

Opened 19 years ago

Closed 15 years ago

#118 closed defect (worksforme)

cppunit fails when xml starts with a blank line

Reported by: joel@… Owned by: cmlenz
Priority: major Milestone:
Component: General Version: 0.5.3
Keywords: Cc:
Operating System:

Description

If the XML data does not immediately start with <?xml the parsing fails. My cppunit output, for some reason, puts a blank line above the XML opener, so I need to manually scrub out the blank line using grep.

Cannot parse:

 
<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
<TestRun>
  <FailedTests>
...

Parses properly:

<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
<TestRun>
  <FailedTests>
...

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by osimons

  • Resolution set to worksforme
  • Status changed from new to closed

Verified, but I don't think there is much that can be done about it as the parsing is done by Python xml module.

>>> x = """

   <?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
   <dummy/>"""
>>> bitten.util.xmlio.parse(x)
...
ParseError: xml declaration not at start of external entity: line 3, column 0

This is in conformance with the XML specification that contains the following: The text declaration MUST NOT appear at any position other than the beginning of an external parsed entity.

I'd suggest you report this non-compliance to the tool vendor instead.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.