method created: processXmlContent() which just returns the PHP array …#11
method created: processXmlContent() which just returns the PHP array …#11mowses wants to merge 2 commits intozendframework:masterfrom
Conversation
…instead of converting it to JSON plain text. Method fromXml() calls processXmlContent() method, fromXml() still returns the result as plain text
convert xml to object instead of array
|
@mowses What problem does it solve? Can you elaborate, please? |
As a library for parsing XML I wanted to use zend-xml2json as a third party library to convert XML to PHP variable (Array/Object), so I realized that there are not any method that could do that. To accomplish this, I just cut some part of the fromXml() code and paste it in the static method processXmlContent() which now returns the resulting array I needed. Now anyone can use zend-xml2json with the option to retrieve the XML as PHP variable, instead of only as JSON (string). Note: I did not removed nor changed any script behavior. The return from fromXml is still the same as before, so I made sure I did not broke applications who are using this method. |
|
This repository has been closed and moved to laminas/laminas-xml2json; a new issue has been opened at laminas/laminas-xml2json#1. |
|
This repository has been moved to laminas/laminas-xml2json. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:
|
…instead of converting it to JSON plain text. Method fromXml() calls processXmlContent() method, fromXml() still returns the result as plain text
Provide a narrative description of what you are trying to accomplish:
Are you fixing a bug?
masterbranch, and submit against that branch.CHANGELOG.mdentry for the fix.Are you creating a new feature?
developbranch, and submit against that branch.CHANGELOG.mdentry for the new feature.Is this related to quality assurance?
Is this related to documentation?