I am loading a lot of xml document and some of them return error like '', hexadecimal value 0x1E, is an invalid character. Line 1, position 202021. and there are different character. How to remove them?

2

1 Answer

Removing them is easy, but unsafe. For example if they are part of a digital signature, the digital signature will become invalid if you remove selected characters.

When someone sends you bad XML you need to find out where it came from and get it fixed at source. If you acquired an electrical appliance whose power plug didn't fit in your power socket, you wouldn't try to bend the pins to make it fit - you would take it back to the shop where you bought it and complain.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.