L
Laurel
I've written a function that might return multiple e-mail addresses. I've
been returning them in an XML string, and parsing it using ReadString, but I
get the error below. (Code for ReadString is also included).
Does anyone have any advice as to the best way to proceed?
1 - See if there's a way to "protect" the @ in the string - I've read the
documentation about using @ instead of quotes, but it will take some time
and effort to figure it out, and it may lead to nothing. Maybe ReadString
just can't do it?
2 - Use an array for the e-mail addresses instead of an XML string.
3 - Some other idea?
THE ERROR
The '@' character, hexadecimal value 0x40, cannot be included in a name.
Line 1, position 34.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: The '@' character, hexadecimal
value 0x40, cannot be included in a name. Line 1, position 34.
THE CODE WHERE THE ERROR OCCURS
if (RecipientsReader.Name == "EmailRecipient")
{
strRecipient = RecipientsReader.ReadString().Trim(); //ERROR HAPPENS HERE
llReturn = QXTools.sendEmail(strEmail, strRecipient, "", "", strTitle,
strComments, "1", "0", "1" );
been returning them in an XML string, and parsing it using ReadString, but I
get the error below. (Code for ReadString is also included).
Does anyone have any advice as to the best way to proceed?
1 - See if there's a way to "protect" the @ in the string - I've read the
documentation about using @ instead of quotes, but it will take some time
and effort to figure it out, and it may lead to nothing. Maybe ReadString
just can't do it?
2 - Use an array for the e-mail addresses instead of an XML string.
3 - Some other idea?
THE ERROR
The '@' character, hexadecimal value 0x40, cannot be included in a name.
Line 1, position 34.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: The '@' character, hexadecimal
value 0x40, cannot be included in a name. Line 1, position 34.
THE CODE WHERE THE ERROR OCCURS
if (RecipientsReader.Name == "EmailRecipient")
{
strRecipient = RecipientsReader.ReadString().Trim(); //ERROR HAPPENS HERE
llReturn = QXTools.sendEmail(strEmail, strRecipient, "", "", strTitle,
strComments, "1", "0", "1" );