We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While using SwiftyXMLParser with a string with unicode characters inside, the parser automatically stops at the (probably) unknown message.
Inside Message was something like this: <xmlopening>@ß123\u{1c}</xmlopening>
<xmlopening>@ß123\u{1c}</xmlopening>
I think the \u{1c} is a character caused by application / data transfer error.
After this line in file, the rest of XML will be ignored.
The text was updated successfully, but these errors were encountered:
@NIESolutions I'm sorry for my late.
XMLParser cannot parse '\u{1c}', because it is invalid as XML Document. Refer to the link.
https://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0
You have to escape them with percent encoding to make a valid XML document.
let str2 = "<xmlopening>@ß123\u{1c}</xmlopening>" .addingPercentEncoding(withAllowedCharacters: CharacterSet.controlCharacters.inverted) let xml = try! XML.parse(str2!) print(xml["xmlopening"].text!.removingPercentEncoding!) // -> "@ß123\u{1C}"
Sorry, something went wrong.
I updated this library to support the invalid character error.
No branches or pull requests
While using SwiftyXMLParser with a string with unicode characters inside, the parser automatically stops at the (probably) unknown message.
Inside Message was something like this:
<xmlopening>@ß123\u{1c}</xmlopening>
I think the \u{1c} is a character caused by application / data transfer error.
After this line in file, the rest of XML will be ignored.
The text was updated successfully, but these errors were encountered: