-
Notifications
You must be signed in to change notification settings - Fork 89
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
XML syntax error on line 9: unescaped < inside quoted string #80
Comments
In XML, the |
The reason why I don't want to use |
@huieric that naturally depends on how you present that data :) You can (and should) always post-process it before showing it to your users... Anyway, you simply cannot override the XML standard regarding special entities just because the standard doesn't fit your aesthetic concept of 'beauty'. You might dislike the standards, but it's thanks to those standards that there is interoperability. Note that you can use hexadecimal constants instead of Also, you can always switch to JSON :-) @antchfx's XPath library also works with JSON, and, arguably, JSON is slightly more human-readable than XML, although, on the flip side, JSON does (deliberately) not support the complex schema validation mechanism provided by XML DTDs... but you might not need it for your project. Last but not least... you can hack this code and supercede the way entity replacements work... but then don't expect the resulting XML to be compatible/readable by anything else out there. That's the price you pay for sidestepping standards... |
XML:
My code:
Error:
As my point of view,
<
which is inside quotes should be allowed to construct an attribute value, but the errors above occur. Any way to let me use the characters<
and>
in attribute values?The text was updated successfully, but these errors were encountered: