Page MenuHomeDevCentral

Output report in XML
ClosedPublic

Authored by DorianWinty on Feb 13 2022, 22:17.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 12:29
Unknown Object (File)
Tue, Dec 17, 05:43
Unknown Object (File)
Fri, Dec 13, 11:26
Unknown Object (File)
Fri, Dec 13, 05:30
Unknown Object (File)
Wed, Dec 11, 22:57
Unknown Object (File)
Sat, Dec 7, 20:53
Unknown Object (File)
Sat, Dec 7, 16:20
Unknown Object (File)
Thu, Dec 5, 12:35
Subscribers

Details

Summary

This change adds test and XML support.

Test Plan

Unit tests for a regular report are provided.

Only missing some cases if the rapport, or a part of it like properties, is empty.

Diff Detail

Repository
rKREPORT Keruald Report
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

DorianWinty created this revision.
DorianWinty retitled this revision from Output report in HTML and Markdown to Output report in XML.Feb 13 2022, 23:12
DorianWinty edited the summary of this revision. (Show Details)

modify the report.xml template to a better one

tests/data/report.xml
6

To be coherent with the section attribute what about this?

<entry title="Air Max 90">
    One of the more icon color is the infrared.
</entry>
src/Output/XMLOutput.php
10

One of the issue with creating XML by hand we don't handle special cases.

Imagine a entry with this text:

In a report, section are closed by </section>. This tag allows to mark the end of the entries.

With your code, that would be written as is.

With a library to write XML, some strategies would allow the content to be safe:

PHP offers directly such capabilities, for example https://www.php.net/manual/en/example.xmlwriter-simple.php

dereckson requested changes to this revision.Feb 14 2022, 21:16
This revision now requires changes to proceed.Feb 14 2022, 21:16
DorianWinty marked 2 inline comments as done.

folowed the comment

This revision is now accepted and ready to land.Feb 16 2022, 22:28
This revision was automatically updated to reflect the committed changes.