带有奇怪xml的反序列化问题 [英] Deserialization problem with a strange xml

查看:119
本文介绍了带有奇怪xml的反序列化问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我有一个奇怪的xml的问题,我不知道如何反序列化它。

这是xml:

< pre lang = xml >
<? xml version = 1.0 编码 = UTF-8 >
< CRMMessage language = en_US 货币 = USD isTrustedSAT = false hostversion = 1.00 >
< RequestCode > GetCustomer < / RequestCode >
< ResponseCode > A < / ResponseCode >
< ResultSet >
< ResultSetMetaData >
< RSColumn name = PRIMARYPOSREF type = string nullable = true > < / RSColumn >
< RSColumn name = ACTIVE type = boolean nullable = false > < / RSColumn >
< RSColumn na我 = firstName 类型 = string nullable = true > < / RSColumn >
< RSColumn name = LastName type = string nullable = true > < / RSColumn >
< RSColumn 名称 = postalCode type = string nullable = true > < / RSColumn >
< RSColumn name = city < span class =code-attribute> type = string nullable = true > < / RSColumn >
< ; RSColumn name < span class =code-keyword> = county 类型 = string nullable = true > < / RSColumn >
< RSColumn name = addressline1 type = string nullable = true
> < / RSColumn >
< RSColumn name = addressline2 type = string nullable = true > < / RSColumn >
< RSColumn 名称 = organizationname type = string nullable = true > < / RSColumn >
< / ResultSetMetaData >
< >
< span class =code-keyword>< id = 168209 >
< Col / >
< Col > 1 < / Col >
< Col > John < / Col >
< Col > Doe < / Col >
< Col / >
< Col / >
< Col / >
< Col / >
< Col / >
< Col / >
< / Row >
< /行 >
< / ResultSet >
< / CRMMessage >

< / pre >

xml将始终返回一行。

感谢您的帮助。
Davide。

解决方案

我已经用这个工具解决了这个问题:简单的XML代码



再见!

Davide。

Hi there,
i've a problem with a strange xml and I don't know how to deserialize it.

This is the xml:

<pre lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<CRMMessage language="en_US" currency="USD" isTrustedSAT="false" hostversion="1.00">
<RequestCode>GetCustomer</RequestCode>
<ResponseCode>A</ResponseCode>
<ResultSet>
<ResultSetMetaData>
<RSColumn name="PRIMARYPOSREF" type="string" nullable="true"></RSColumn>
<RSColumn name="ACTIVE" type="boolean" nullable="false"></RSColumn>
<RSColumn name="firstName" type="string" nullable="true"></RSColumn>
<RSColumn name="LastName" type="string" nullable="true"></RSColumn>
<RSColumn name="postalCode" type="string" nullable="true"></RSColumn>
<RSColumn name="city" type="string" nullable="true"></RSColumn>
<RSColumn name="county" type="string" nullable="true"></RSColumn>
<RSColumn name="addressline1" type="string" nullable="true"></RSColumn>
<RSColumn name="addressline2" type="string" nullable="true"></RSColumn>
<RSColumn name="organizationname" type="string" nullable="true"></RSColumn>
</ResultSetMetaData>
<Rows>
<Row id="168209">
<Col />
<Col>1</Col>
<Col>John</Col>
<Col>Doe</Col>
<Col />
<Col />
<Col />
<Col />
<Col />
<Col />
</Row>
</Rows>
</ResultSet>
</CRMMessage>

</pre>

The xml will return always one row.

Thanks for your help.
Davide.

解决方案

I've solved making the classes with this tool: Simple XML to Code.

Bye!
Davide.


这篇关于带有奇怪xml的反序列化问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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