需要以xml格式获取数据 [英] Need to get data in xml format

查看:77
本文介绍了需要以xml格式获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用来自Web服务的方法.我正在使用字符串来捕获这种格式

Claims =< Claims> \ n \ n< Claim> \ n \ n< ClaimNo> C11-20676194</ClaimNo> \ n \ n< ClaimCategory> C82</ClaimCategory> \ n \ n& lt; Status& gt; Open& lt;/Status& gt; \ n \ n< TATcrossed" Y& lt;/TATcrossed& amp; ; gt; \ n \ n& lt/Claim& gt; \ n \ n& ltClaim

...

所有标签已替换为; lt ....等.

我需要捕获这是纯xml格式,以便我可以处理内部细节.

请帮助

i am trying to use a method from a webservice .. i am using a string to capture this format

claims=&lt;Claims&gt;\n\n&lt;Claim&gt;\n\n&lt;ClaimNo&gt;C11-20676194&lt;/ClaimNo&gt;\n\n&lt;ClaimCategory&gt;C82&lt;/ClaimCategory&gt;\n\n&lt;Status&gt;Open&lt;/Status&gt;\n\n&lt;TATcrossed&gt;Y&lt;/TATcrossed&gt;\n\n&lt;/Claim&gt;\n\n&lt;Claim

...

All the tags have been replaced by ;lt.... etc.

i need to capture this is pure xml format so that i can manipulate internal details.

Kindly help

推荐答案

有这样的问题,我已经回答了:
如何转换<"和>"插入xml响应中的xml标签 [
There was the question like this and I answered already:
How to Convert "<" and ">" into xml tags in xml response[^]


在我看来,您可以了解有关XMLSerialization和Deserialization的概念,对您有用.

您可以参考此链接;
http://dotnetusers.wordpress.com/2011/03 /18/xmldeserialization-using-c-net
In my view you can have concepts regarding XMLSerialization and Deserialization then it will be useful for you.

You can refer this link;
http://dotnetusers.wordpress.com/2011/03/18/xmldeserialization-using-c-net


为什么不仅仅创建XDocument或XmlDocument?这些是Xml的对象.
Why not just create an XDocument or XmlDocument? Those are objects meant for Xml.


这篇关于需要以xml格式获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆