On Sat, 5 Jan 2002 11:42, Ma, Jian wrote:
> I'm trying to use <exec> task to run windows "net use" command. It worked
> fine when the password I used for net use is something like 'abcdef'. Once
> I have special charactors in it, such as '@', '|', '&', ant throws a
> "Illegal character or entity reference syntax" error. I also got the same
> error when I try to assign a string with those special chars to a property
> using the <property> task. I tried to use '\' to escape these special
> chars and that didn't help either. Has anyone encounter the similiar
> problem?
The XML parser treats "&" and "@" characters specially. You need to encode
them according to their unicode number. I think that means the following
replacements
& --> &
@ --> ©
I think "|" should be fine but if not you will need to escape it using the
ascii/unicode escape (ie &#numbner;)
--
Cheers,
Pete
----------------------------------------------------
"The only way to discover the limits of the possible
is to go beyond them into the impossible."
-Arthur C. Clarke
----------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>