XML

<?xml version=\"1.0\"?>
<ClientHello xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://www.vivotek.com/Surveillance/ST7501\">
<Version>1.0</Version>
<Msg>dddd</Msg>
<MyName>ffaffaf</MyName>
<MyRefName>fsfewfrewfwe</MyRefName>
</ClientHello>

解决方案 »

  1.   

    新版的CSDN怎么我在标题栏上按了一下回车就把帖子发出去了,生气我使用XSD.exe生成一个XSD文件的CS代码,然后把ClientHello 这个Class系列化输出,请问如何才能去掉xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://www.vivotek.com/Surveillance/ST7501\"这部分内容?以及去掉<?xml version=\"1.0\"? > 这部分内容?<?xml version=\"1.0\"? > 
    <ClientHello xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://www.vivotek.com/Surveillance/ST7501\" > 
    <Version >1.0 </Version > 
    <Msg >dddd </Msg > 
    <MyName >ffaffaf </MyName > 
    <MyRefName >fsfewfrewfwe </MyRefName > 
    </ClientHello > 
      

  2.   

    去除你生成的Class中的[System.Xml.Serialization.XmlTypeAttribute(Namespace =....
      

  3.   

    <?xml version=\"1.0\"?>
    <ClientHello xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://www.vivotek.com/Surveillance/ST7501\">
    这两行代码的意思是什么啊