Page MenuHomeDevCentral

Output report in XML
ClosedPublic

Authored by DorianWinty on Feb 13 2022, 22:17.
Tags
None
Referenced Files
F3743580: D2527.id6382.diff
Thu, Nov 14, 22:07
Unknown Object (File)
Thu, Nov 14, 07:59
Unknown Object (File)
Tue, Nov 12, 11:53
Unknown Object (File)
Mon, Nov 11, 20:22
Unknown Object (File)
Mon, Nov 11, 07:51
Unknown Object (File)
Sun, Nov 10, 05:12
Unknown Object (File)
Fri, Nov 8, 19:29
Unknown Object (File)
Thu, Nov 7, 20:43
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 Passed
Unit
Tests Passed
Branch
adding_xml
Build Status
Buildable 3949
Build 4200: arc lint + arc unit

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
5

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
9

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.