在xml字符串中过滤 [英] Filter in xml String
本文介绍了在xml字符串中过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨我有一个像这样的xml字符串
Hi I have a xml string like this
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="https://api.repaircenter-uat.mitchell.com:8083/RepairOrder/JobService.svc/">
<title type="text">Totals</title>
<id>https://api.repaircenter-uat.mitchell.com:8083/RepairOrder/JobService.svc/Totals</id>
<updated>2013-08-27T14:16:20Z</updated>
<link rel="self" title="Totals" href="Totals" />
<entry>
<id>https://api.repaircenter-uat.mitchell.com:8083/RepairOrder/JobService.svc/Totals(JobId=6,ShopId='1000')</id>
<title type="text" />
<updated>2013-08-27T14:16:20Z</updated>
<author>
<name />
</author>
<link rel="edit" title="Total" href="Totals(JobId=6,ShopId='1000')" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Job" type="application/atom+xml;type=entry" title="Job" href="Totals(JobId=6,ShopId='1000')/Job" />
<category term="Mitchell.Repair.Services.Data.RepairOrder.JobData.Total" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:JobId m:type="Edm.Int32">6</d:JobId>
<d:ShopId>1000</d:ShopId>
<d:AppearanceAllowanceAmount m:type="Edm.Double">0</d:AppearanceAllowanceAmount>
<d:BettermentAmount m:type="Edm.Double">0</d:BettermentAmount>
<d:CustomerPayAmount m:type="Edm.Double">500</d:CustomerPayAmount>
<d:CustomerTaxAmount m:type="Edm.Double">0</d:CustomerTaxAmount>
<d:InsurancePayAmount m:type="Edm.Double">1373.38000488281</d:InsurancePayAmount>
<d:InsuranceTaxAmount m:type="Edm.Double">70.2799987792969</d:InsuranceTaxAmount>
<d:OriginalPayAmount m:type="Edm.Double">1873.38000488281</d:OriginalPayAmount>
<d:OriginalTaxAmount m:type="Edm.Double">70.2799987792969</d:OriginalTaxAmount>
<d:Hours m:type="Edm.Double">16.50000029802322</d:Hours>
<d:PayAmount m:type="Edm.Double">1873.38000488281</d:PayAmount>
<d:TaxAmount m:type="Edm.Double">70.2799987792969</d:TaxAmount>
</m:properties>
</content>
</entry>
<entry>
<id>https://api.repaircenter-uat.mitchell.com:8083/RepairOrder/JobService.svc/Totals(JobId=526,ShopId='1000')</id>
<title type="text" />
<updated>2013-08-27T14:16:20Z</updated>
<author>
<name />
</author>
<link rel="edit" title="Total" href="Totals(JobId=526,ShopId='1000')" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Job" type="application/atom+xml;type=entry" title="Job" href="Totals(JobId=526,ShopId='1000')/Job" />
<category term="Mitchell.Repair.Services.Data.RepairOrder.JobData.Total" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:JobId m:type="Edm.Int32">526</d:JobId>
<d:ShopId>1000</d:ShopId>
<d:AppearanceAllowanceAmount m:type="Edm.Double">0</d:AppearanceAllowanceAmount>
<d:BettermentAmount m:type="Edm.Double">0</d:BettermentAmount>
<d:CustomerPayAmount m:type="Edm.Double">542</d:CustomerPayAmount>
<d:CustomerTaxAmount m:type="Edm.Double">0</d:CustomerTaxAmount>
<d:InsurancePayAmount m:type="Edm.Double">638.03</d:InsurancePayAmount>
<d:InsuranceTaxAmount m:type="Edm.Double">48.13</d:InsuranceTaxAmount>
<d:OriginalPayAmount m:type="Edm.Double">1138.03</d:OriginalPayAmount>
<d:OriginalTaxAmount m:type="Edm.Double">48.13</d:OriginalTaxAmount>
<d:Hours m:type="Edm.Double">11.3</d:Hours>
<d:PayAmount m:type="Edm.Double">1180.03</d:PayAmount>
<d:TaxAmount m:type="Edm.Double">48.13</d:TaxAmount>
</m:properties>
</content>
</entry>
我想过滤这个xml中的属性任何一个请帮帮我...
I want to filter the Property in side this xml any one please help me...
推荐答案
查看此链接
使用XSL对数据进行排序和过滤 [ ^ ]
这篇关于在xml字符串中过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文