I have an object to be serialized using XMLSerializer.serialize()
. I have successfully serialize the objects to XML string then write it to file and the file can be read successfully using XmlDocument.load()
.
But now, a value in object's attribute contains <
. The serialize function serializes the object successfully but XMLDocument.load()
failed reading the file because the <
is found with a wrong format. Is there any function to replace any attribute value in object which contains <
or >
to <
or >
without replacing it one by one? Or there is another way to do this?