I am trying to send a value like <Somevalue = "Value A/B">
through XML.As "/" comes under illegal character,I tired to encode like ⁄
for slash but it is not working.Is there anyway to do the same?
views:
1001answers:
4"/" isn't an illegal character in XML at all. It may be illegal for the particular service you're using, however.
Could you give more context? I strongly suspect this isn't really an XML question, but a service-specific question. I suspect if you look at the error message you're getting, it will talk about invalid values rather than illegal XML. (If you could post that error message in full, it would be helpful too.)
Forwardslash isn't a special character in XML. The snipped you posted is well-formed. What's saying it's illegal?
You could try using / (2F being the hex for the ASCII character code for the forwardslash character).
The xml sample you have given there is not valid, irrespective of the slash (which is valid)
I'm guessing it should either be something like
<Somevalue>Value A/B</Somevalue>
OR
<Somevalue value="Value A/B"/>
In any case - until you fix your xml, it won't work.
Hi everybody,looks like this is a problem in the application where the XML value is being sent.Thanks for your help.