Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to deal with ampersend sign?
Message
 
 
À
02/01/2008 13:12:46
Information générale
Forum:
ASP.NET
Catégorie:
XML
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01278970
Message ID:
01279022
Vues:
19
Thank you for the references. Yes, this is what I will probably have to do on the VFP side, whereas I was hoping that there is a way to do it on the .NET XML side.

Re: Parsing Error - Invalid Token Due to & Thread #901300 Message #901368
>Re: Parsing Error - Invalid Token Due to & Thread #901300 Message #901309
>
>
>
>>>>>>When building an XML file in code (using XmlDocument) how do I specify that some elements should be able to contain any characters? (even ampersand sign &)?
>>>>>>
>>>>>>Thank you.
>>>>>
>>>>>If you are building the XML file manually, I think you will need to replace the ampersand with &. Here is a page that shows the XML special characters:
>>>>>
>>>>>http://www.devx.com/tips/Tip/14068
>>>>
>>>>Thank you for the reply, suggestion, and the link.
>>>>
>>>>You probably were saying to replace & with & + "amp" + ";"? This is what I am trying to avoid. Let me give you an example.
>>>>
>>>>User enters in a multi-line text box something like "Paul & Jane". My ASP.NET application adds the .value of this text box to an XML and the XML is then sent to VFP database. I believe that somewhere along the way, the "&" in the text is converted to "&" + "amp" + ";". Then the user later looks at the text (in the VFP application) and sees "Paul "&" + "amp" + ";" Jane". It has to say only & just like it was originally typed. So, I believe that I need to add something to the XML file to make ASP.NET allow any characters. Does it make sense?
>>>
>>>Yes, I see what you mean. Unfortately, I can't think of anything of the top of my head to help you. It seems like you need some sort of XML encoding and decoding funcationality.
>>>
>>>Maybe this can help you: http://msdn2.microsoft.com/en-us/library/35577sxd(VS.71).aspx
>>
>>I think if nobody makes a suggestion I will have to write a code to process the text (on the VFP side) and to convert the "&" + "amp" + ";" back to a single "&".
>>
>>Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform