<?xml version="1.0" encoding="UTF-8"?>
<!-- mask="{1,2}" 表示小数点后可以1~2位 mask="" 表示只能输入整数 -->
<Config>
<PitchFace desc="沥青路面" code="248">
<row code="01" desc="龟裂" cols="3" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row code="02" desc="块状裂缝" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="0.8" scopeCode="2"/>
</row>
<row code="03" desc="纵向裂缝" cols="2" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1" />
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="04" desc="横向裂缝" cols="2" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="05" desc="坑槽" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.8" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="06" desc="松散" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="07" desc="沉陷" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="08" desc="车辙" cols="2" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="09" desc="波浪拥包" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="10" desc="泛油" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.2" scopeCode="1"/>
</row>
<row code="11" desc="修补" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="" power="0.1" scopeCode="1"/>
</row>
</PitchFace>
<GroutFace desc="水泥混凝土路面" code="259">
<row desc="破碎板" code="01" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.8" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row desc="裂缝" code="02" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row desc="板角断裂" code="03" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row desc="错台" code="04" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row desc="唧泥" code="05" unit="m" mask="{1,2}">
<prop scope="" power="1.0" scopeCode="1"/>
</row>
<row desc="边角剥落" code="06" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row desc="接缝料损坏" code="07" unit="m" mask="{1,2}">
<prop scope="轻" power="0.4" scopeCode="1"/>
<prop scope="重" power="0.6" scopeCode="2"/>
</row>
<row desc="坑洞" code="08" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="" power="1.0" scopeCode="1"/>
</row>
<row desc="拱起" code="09" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="露骨" code="10" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.3" scopeCode="1"/>
</row>
<row desc="修补" code="11" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.1" scopeCode="1"/>
</row>
</GroutFace>
<SandFace desc="砂石路面" code="271">
<row desc="路拱不适" code="01" unit="m" mask="{1,2}">
<prop scope=" " power="0.1" scopeCode="1"/>
</row>
<row desc="沉陷" code="02" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.8" scopeCode="1"/>
</row>
<row desc="波浪搓板" code="03" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="车辙" code="04" unit="m" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="坑槽" code="05" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="露骨" code="06" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.8" scopeCode="1"/>
</row>
</SandFace>
<RoadbedErr desc="路基损坏" code="249">
<row desc="路肩边沟不洁" code="01" unit="m" mask="{1,2}">
<prop scope=" " deduct="0.5" power="0.05" scopeCode="1"/>
</row>
<row desc="路肩损坏" code="02" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" deduct="1" power="0.10" scopeCode="1"/>
<prop scope="重" deduct="2" power="0.10" scopeCode="2"/>
</row>
<row desc="边坡坍塌" code="03" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.25" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.25" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.25" scopeCode="3"/>
</row>
<row desc="水毁冲沟" code="04" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.25" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.25" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.25" scopeCode="3"/>
</row>
<row desc="路基构造物损坏" code="05" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.10" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.10" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.10" scopeCode="3"/>
</row>
<row desc="路缘石缺损" code="06" unit="m" mask="{1,2}">
<prop scope=" " deduct="4" power="0.05" scopeCode="1"/>
</row>
<row desc="路基沉降" code="07" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.10" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.10" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.10" scopeCode="3"/>
</row>
<row desc="排水系统淤塞" code="08" unit="m/处" mask="{1,2}/ ">
<prop scope="轻" deduct="1" power="0.10" scopeCode="1"/>
<prop scope="重" deduct="20" power="0.10" scopeCode="2"/>
</row>
</RoadbedErr>
<Structure desc="桥隧构筑物" code="287">
<row desc="桥梁" code="01" unit="座" mask="">
<prop scope="一、二" deduct="0" scopeCode="1"/>
<prop scope="三" deduct="40" scopeCode="2"/>
<prop scope="四" deduct="70" scopeCode="3"/>
<prop scope="五" deduct="100" scopeCode="4"/>
</row>
<row desc="隧道" code="02" unit="座" mask="">
<prop scope="S:无异常" deduct="0" scopeCode="1"/>
<prop scope="B:有异常" deduct="50" scopeCode="2"/>
<prop scope="A:有危险" deduct="100" scopeCode="3"/>
</row>
<row desc="涵洞" code="03" unit="座" mask="">
<prop scope="好、较好" deduct="0" scopeCode="1"/>
<prop scope="较差" deduct="40" scopeCode="2"/>
<prop scope="差" deduct="70" scopeCode="3"/>
<prop scope="危险" deduct="100" scopeCode="4"/>
</row>
</Structure>
<Equipment desc="沿线设施" code="250" >
<row desc="防护设施缺损" code="01" unit="处" mask="">
<prop scope="轻" deduct="10" power="0.25" scopeCode="1"/>
<prop scope="重" deduct="30" power="0.25" scopeCode="2"/>
</row>
<row desc="隔离栅损坏" code="02" unit="处" mask="">
<prop scope=" " deduct="20" power="0.10" scopeCode="1"/>
</row>
<row desc="标示缺损" code="03" unit="处" mask="">
<prop scope=" " deduct="20" power="0.25" scopeCode="1"/>
</row>
<row desc="标线缺损" code="04" unit="m" mask="{1,2}">
<prop scope=" " deduct="0.1" power="0.20" scopeCode="1"/>
</row>
<row desc="绿化管护不善" code="05" unit="m" mask="{1,2}">
<prop scope=" " deduct="0.1" power="0.20" scopeCode="1"/>
</row>
</Equipment>
</Config>比如我要找到:沥青路面-龟裂-轻的power="0.6"中的0.6,但是我缺要根据PitchFace里的code="248"以及下面的 <row code="01"下面的<prop scope="轻" power="0.6" scopeCode="1"/>中的scopeCode="1"来找这个0.6该如何读取寻找.
最好是能用jdom.其他的也无所谓. 谢谢大家了.
<!-- mask="{1,2}" 表示小数点后可以1~2位 mask="" 表示只能输入整数 -->
<Config>
<PitchFace desc="沥青路面" code="248">
<row code="01" desc="龟裂" cols="3" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row code="02" desc="块状裂缝" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="0.8" scopeCode="2"/>
</row>
<row code="03" desc="纵向裂缝" cols="2" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1" />
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="04" desc="横向裂缝" cols="2" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="05" desc="坑槽" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.8" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="06" desc="松散" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="07" desc="沉陷" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="08" desc="车辙" cols="2" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="09" desc="波浪拥包" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row code="10" desc="泛油" cols="2" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.2" scopeCode="1"/>
</row>
<row code="11" desc="修补" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="" power="0.1" scopeCode="1"/>
</row>
</PitchFace>
<GroutFace desc="水泥混凝土路面" code="259">
<row desc="破碎板" code="01" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.8" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row desc="裂缝" code="02" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row desc="板角断裂" code="03" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row desc="错台" code="04" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="重" power="1.0" scopeCode="2"/>
</row>
<row desc="唧泥" code="05" unit="m" mask="{1,2}">
<prop scope="" power="1.0" scopeCode="1"/>
</row>
<row desc="边角剥落" code="06" unit="m" mask="{1,2}">
<prop scope="轻" power="0.6" scopeCode="1"/>
<prop scope="中" power="0.8" scopeCode="2"/>
<prop scope="重" power="1.0" scopeCode="3"/>
</row>
<row desc="接缝料损坏" code="07" unit="m" mask="{1,2}">
<prop scope="轻" power="0.4" scopeCode="1"/>
<prop scope="重" power="0.6" scopeCode="2"/>
</row>
<row desc="坑洞" code="08" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="" power="1.0" scopeCode="1"/>
</row>
<row desc="拱起" code="09" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="露骨" code="10" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.3" scopeCode="1"/>
</row>
<row desc="修补" code="11" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.1" scopeCode="1"/>
</row>
</GroutFace>
<SandFace desc="砂石路面" code="271">
<row desc="路拱不适" code="01" unit="m" mask="{1,2}">
<prop scope=" " power="0.1" scopeCode="1"/>
</row>
<row desc="沉陷" code="02" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.8" scopeCode="1"/>
</row>
<row desc="波浪搓板" code="03" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="车辙" code="04" unit="m" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="坑槽" code="05" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="1.0" scopeCode="1"/>
</row>
<row desc="露骨" code="06" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope=" " power="0.8" scopeCode="1"/>
</row>
</SandFace>
<RoadbedErr desc="路基损坏" code="249">
<row desc="路肩边沟不洁" code="01" unit="m" mask="{1,2}">
<prop scope=" " deduct="0.5" power="0.05" scopeCode="1"/>
</row>
<row desc="路肩损坏" code="02" unit="m<sup>2</sup>" mask="{1,2}">
<prop scope="轻" deduct="1" power="0.10" scopeCode="1"/>
<prop scope="重" deduct="2" power="0.10" scopeCode="2"/>
</row>
<row desc="边坡坍塌" code="03" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.25" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.25" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.25" scopeCode="3"/>
</row>
<row desc="水毁冲沟" code="04" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.25" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.25" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.25" scopeCode="3"/>
</row>
<row desc="路基构造物损坏" code="05" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.10" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.10" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.10" scopeCode="3"/>
</row>
<row desc="路缘石缺损" code="06" unit="m" mask="{1,2}">
<prop scope=" " deduct="4" power="0.05" scopeCode="1"/>
</row>
<row desc="路基沉降" code="07" unit="处" mask="">
<prop scope="轻" deduct="20" power="0.10" scopeCode="1"/>
<prop scope="中" deduct="30" power="0.10" scopeCode="2"/>
<prop scope="重" deduct="50" power="0.10" scopeCode="3"/>
</row>
<row desc="排水系统淤塞" code="08" unit="m/处" mask="{1,2}/ ">
<prop scope="轻" deduct="1" power="0.10" scopeCode="1"/>
<prop scope="重" deduct="20" power="0.10" scopeCode="2"/>
</row>
</RoadbedErr>
<Structure desc="桥隧构筑物" code="287">
<row desc="桥梁" code="01" unit="座" mask="">
<prop scope="一、二" deduct="0" scopeCode="1"/>
<prop scope="三" deduct="40" scopeCode="2"/>
<prop scope="四" deduct="70" scopeCode="3"/>
<prop scope="五" deduct="100" scopeCode="4"/>
</row>
<row desc="隧道" code="02" unit="座" mask="">
<prop scope="S:无异常" deduct="0" scopeCode="1"/>
<prop scope="B:有异常" deduct="50" scopeCode="2"/>
<prop scope="A:有危险" deduct="100" scopeCode="3"/>
</row>
<row desc="涵洞" code="03" unit="座" mask="">
<prop scope="好、较好" deduct="0" scopeCode="1"/>
<prop scope="较差" deduct="40" scopeCode="2"/>
<prop scope="差" deduct="70" scopeCode="3"/>
<prop scope="危险" deduct="100" scopeCode="4"/>
</row>
</Structure>
<Equipment desc="沿线设施" code="250" >
<row desc="防护设施缺损" code="01" unit="处" mask="">
<prop scope="轻" deduct="10" power="0.25" scopeCode="1"/>
<prop scope="重" deduct="30" power="0.25" scopeCode="2"/>
</row>
<row desc="隔离栅损坏" code="02" unit="处" mask="">
<prop scope=" " deduct="20" power="0.10" scopeCode="1"/>
</row>
<row desc="标示缺损" code="03" unit="处" mask="">
<prop scope=" " deduct="20" power="0.25" scopeCode="1"/>
</row>
<row desc="标线缺损" code="04" unit="m" mask="{1,2}">
<prop scope=" " deduct="0.1" power="0.20" scopeCode="1"/>
</row>
<row desc="绿化管护不善" code="05" unit="m" mask="{1,2}">
<prop scope=" " deduct="0.1" power="0.20" scopeCode="1"/>
</row>
</Equipment>
</Config>比如我要找到:沥青路面-龟裂-轻的power="0.6"中的0.6,但是我缺要根据PitchFace里的code="248"以及下面的 <row code="01"下面的<prop scope="轻" power="0.6" scopeCode="1"/>中的scopeCode="1"来找这个0.6该如何读取寻找.
最好是能用jdom.其他的也无所谓. 谢谢大家了.
解决方案 »
- 从数据库输出图片,在JSP页面上分页显示
- 项目整合的错误 急 在线等。。。。
- spring + mybaits ORA-12519, TNS:no appropriate service handler found 急!!谢谢帮忙,在线等
- 菜鸟求助问题,急!!谢谢大牛们了~
- 我用poi读excel,在window下没有问题,但把程序放到linux上时,读取客户端的excel文件报错,不知道如何解决
- 请问连接oracle用java bean如何来写?
- 使用new方法的简单问题 ,高分在线请求帮助
- DWR与REST的适用地方以及利弊
- 虚心请教,servlet中的相对路径图片存放位置。
- 请教大神 我这个错误是怎么回事啊?加上jsp-api.jar报一个错误,不加报另一个错误,在线跪求解决办法啊
- 怎么实现一个拦截网页弹出框的功能?具体思路?
- SSI页面初始化时调用一个Action
String fileName = "****.xml";
ReadXml test = new ReadXml();
Document doc = test.read(fileName);
Element root = test.getRootElement(doc);
然后遍历config这个根节点下的PitchFace
// 遍历名称为PitchFace的节点
for (Iterator i = root.elementIterator("PitchFace"); i.hasNext();) {
Element pf = (Element) i.next();
// 遍历PitchFace的属性
for (Iterator it = pf.attributeIterator(); it.hasNext();) {
Attribute attribute = (Attribute) it.next();
System.out.println(attribute.getName() + ":"
+ attribute.getValue());
} System.out.println(pf.elementText("row"));
System.out.println(pf.elementText("prop"));
// 遍历PitchFace的子节点“prop”的属性
for (Iterator it = pf.element("prop").attributeIterator(); it
.hasNext();) {
Attribute attribute = (Attribute) it.next();
System.out.println(attribute.getName() + ":"
+ attribute.getValue());
} System.out.println(pf.elementText("prower"));
}一层层遍历吧