Xml special character
-
Sorry, forgot to tick the ignore HTML box: Can I get the special xml strings (< & etc) directly instead of being translated? For example, given the data "RCI>", the code: xmlReader.ReadStartElement("DATA"); data = xmlReader.ReadString(); xmlReader.ReadEndElement(); Gives: "RCI>". Can I get the raw "RCI>" and if so, how? Thanks
-
Sorry, forgot to tick the ignore HTML box: Can I get the special xml strings (< & etc) directly instead of being translated? For example, given the data "RCI>", the code: xmlReader.ReadStartElement("DATA"); data = xmlReader.ReadString(); xmlReader.ReadEndElement(); Gives: "RCI>". Can I get the raw "RCI>" and if so, how? Thanks
Try this u will get "RCI>" xmlReader.ReadInnerXml()
-
Sorry, forgot to tick the ignore HTML box: Can I get the special xml strings (< & etc) directly instead of being translated? For example, given the data "RCI>", the code: xmlReader.ReadStartElement("DATA"); data = xmlReader.ReadString(); xmlReader.ReadEndElement(); Gives: "RCI>". Can I get the raw "RCI>" and if so, how? Thanks
pass each string in the following function, and you will always get the right result:
Public Function MakeXMLString(ByVal text As String) As String text = text.Replace("&", "&") text = text.Replace("'", "'") text = text.Replace("""", """) text = text.Replace("<", "<") text = text.Replace(">", ">") Return text End Function
good luck!