【发布时间】:2011-09-07 15:30:09
【问题描述】:
我有这种类型的 XML
<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfCustomer
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://tempuri.org/">
<Customer>
<Customer_id>143</Customer_id>
<Cust_last_name>Deutsch</Cust_last_name>
<Cust_first_name>Leslie</Cust_first_name>
<Gender_id>2</Gender_id>
<Email>ldeutsch16@univ.demo</Email>
<Income_id>3</Income_id>
</Customer>
<Customer>
<Customer_id>327</Customer_id>
<Cust_last_name>Marko</Cust_last_name>
<Cust_first_name>Shelby</Cust_first_name>
<Gender_id>1</Gender_id>
<Email>smarko75@free.demo</Email>
<Income_id>5</Income_id>
</Customer>
</ArrayOfCustomer>
你能建议如何解析它吗?
【问题讨论】:
-
这段代码有什么问题?
-
你没有说明你的问题,代码太多了。更简洁。另外,你应该格式化你的代码,这样就可以在不需要水平滚动的情况下阅读它。