Redian新闻
>
hexadecimal value 0x00, is an invalid ch
avatar
hexadecimal value 0x00, is an invalid ch# DotNet - 窗口里的风景
c*o
1
i have a web service returning a big xml, it works fine with the default test
page on .asmx page. but when i built a client using the proxy class,and used
it to retrieve the XML and tried to print it out in a text box, got error:
hexadecimal value 0x00, is an invalid character. Line 1, position 12345.
any idea what is wrong? i googled and didn't find much helpful information
including the one below
http://www.dotnet247.com/247reference/msgs/43/217663.aspx
thanks a bunch
avatar
c*o
2
it seems that the xml string have a 0x00 character at the end which needs to
be got rid of ....
like this:
thisString.Trim(Convert.ToChar(0));

test

【在 c******o 的大作中提到】
: i have a web service returning a big xml, it works fine with the default test
: page on .asmx page. but when i built a client using the proxy class,and used
: it to retrieve the XML and tried to print it out in a text box, got error:
: hexadecimal value 0x00, is an invalid character. Line 1, position 12345.
: any idea what is wrong? i googled and didn't find much helpful information
: including the one below
: http://www.dotnet247.com/247reference/msgs/43/217663.aspx
: thanks a bunch

avatar
e*e
3
isn't that a null value and thus different from null string, so u have to treat
it separately and specially?

【在 c******o 的大作中提到】
: it seems that the xml string have a 0x00 character at the end which needs to
: be got rid of ....
: like this:
: thisString.Trim(Convert.ToChar(0));
:
: test

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。