Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer use XML::Parser and XML::Parser::Lite, switch to XML::LibXML #88

Closed
bschmalhofer opened this issue Jun 16, 2020 · 7 comments
Closed
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

For some reason both XML::LibXML and XML::Parser are used in OTOBO. I propose to standardise on XML::LibXML.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Jul 1, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.1 milestone Jul 1, 2020
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.1, OTOBO 11.0 Jul 22, 2020
@bschmalhofer bschmalhofer modified the milestones: OTOBO 11.0, Wishlist Aug 17, 2020
@svenoe
Copy link
Contributor

svenoe commented Sep 17, 2020

In principle there is no reason against it, priority is very low however.

@svenoe svenoe closed this as completed Sep 24, 2020
@bschmalhofer bschmalhofer changed the title Consistently use either XML::LibXML or XML::Parser Deprecate the use of XML::Parser, switch to XML::LibXML Jun 1, 2022
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Jun 1, 2022

XML::Parser is also used in Kernel::System::XML which adds another layer of brokenness. Examples of the brokenness are now included in scripts/test/XML.t .

bschmalhofer added a commit that referenced this issue Jun 1, 2022
for the cases where Kernel::System::XML is declared as a dependency,
but not really is a dependency
bschmalhofer added a commit that referenced this issue Jun 1, 2022
@bschmalhofer bschmalhofer reopened this Jun 1, 2022
bschmalhofer added a commit that referenced this issue Jun 3, 2022
as we are working with subtests now
bschmalhofer added a commit that referenced this issue Jun 3, 2022
bschmalhofer added a commit that referenced this issue Jun 4, 2022
bschmalhofer added a commit that referenced this issue Jun 4, 2022
…mentation

Issue #88 more tests and documentation
@bschmalhofer
Copy link
Contributor Author

Enhanced the documentation for Kernel::System::XML and added some tests.

@svenoe svenoe modified the milestones: Wishlist, OTOBO 11.0 Feb 10, 2023
@bschmalhofer bschmalhofer changed the title Deprecate the use of XML::Parser, switch to XML::LibXML Deprecate the use of XML::Parser and XML::Parser::Lite, switch to XML::LibXML Feb 21, 2023
@bschmalhofer
Copy link
Contributor Author

Kernel::System::XML also uses XML::Parser::Lite when XML::Parser has problems. Let't test without the fallback first, before migrating Kernel::System::XML to XML::LibXML.

bschmalhofer added a commit that referenced this issue Feb 21, 2023
Issue #88: remove fallback to XML::Parser::Lite
@bschmalhofer
Copy link
Contributor Author

Kernel::System::XML could be migrated to XML::LibXML by using XML::LibXML::SAX::Parser. Let's see whether it can be made bug compatible.

bschmalhofer added a commit that referenced this issue Feb 22, 2023
Issue #88: added some explicit tests for XMLParse()
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Feb 28, 2023

In Kernel/GenericInterface/Mapping/XSLT.pm there is an usage of XML::Simple. XML::Simple falls back to XML::Parser for parsing XML. A first idea is to switch to Kernel::System::XML::Simple, but that module does not have a XMLOut() method. XMLOut() can't be easily added, as the underlying module XML::LibXML::Simple does not have XMLOut(). So let's stick with XML::Simple. But let's tell XML::Simple to use XML::LibXML::SAX::Parser for the parsing part.

@bschmalhofer bschmalhofer changed the title Deprecate the use of XML::Parser and XML::Parser::Lite, switch to XML::LibXML No longer use XML::Parser and XML::Parser::Lite, switch to XML::LibXML Feb 28, 2023
bschmalhofer added a commit that referenced this issue Feb 28, 2023
Also remove XML::Parset as a dependency.
bschmalhofer added a commit that referenced this issue Mar 1, 2023
bschmalhofer added a commit that referenced this issue Mar 1, 2023
No significant changes for OTOBO
bschmalhofer added a commit that referenced this issue Mar 1, 2023
Note that eval returns result of the last expression
in the evaluated block.
bschmalhofer added a commit that referenced this issue Mar 1, 2023
Set up the XML parser explicitly because XML::SAX::Expat would
be used per default. But the goal is to consolidate to XML::LibXML.
bschmalhofer added a commit that referenced this issue Mar 1, 2023
@bschmalhofer
Copy link
Contributor Author

Replaced all usages of XML::Parser that I found. The test suite looks fine. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants