-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Issue with XML containing subdeclaration #62
Comments
I think processing instructions not covered yet |
Sorry for the late response. It is a festive season here. As @Delagen said, it is not covered yet. It's a very small change. I'll publish the changes on Monday. |
Please use 3.4.0 |
@amitguptagwl i can't find a reference on how to access the processing instructions. Is it correct to say that only the validator is aware of it? I would like to access the processing instructions after validation as well, they contain valuable info. |
Validator is checking for valid syntax of PI. And parser is ignoring them to read. Can you please tell me some use case where you feel you want keep their data and the desire format of the data. We can plan to include it into v4. |
@amitguptagwl thanks for the quick reply. PI's do have a dedicated purpose, normally it is a connection between XML authors and the xml-aware application [1]. My use case is that I receive an XML from someone else. This author decided to use PI's to embed metadata of the XML. One could argue that the purpose of PIs is not related to metadata and the author could've chosen to embed that metadata in a real tag, but this is where we are and technically the author is complying with the XML standard. Further, it seems to me that a parser reading a valid xml should return to me all the information in there, including the PI, which is part of XML standard. Sadly, as XML popularity declines it seems to me there are not many robust parsers out there who do take PIs into account as it may be more of an obscure use case in 2020, I've only found hobby parser projects that do keep PI's in the JSON output. Regarding the desired format, I think continuing with fast-xml-parser standard would be best, that is, in similarity to using the Let me know if this makes sense or if I can provide more specific examples. |
I have created another issue to track it |
Please check v4.0.0-beta.6 |
Input data
Output data
expected data
true
The text was updated successfully, but these errors were encountered: