0
這裏我的XML文件和我的XML文件的大小大於100MB .............如何通過Java讀取XML的父屬性值(如果其子屬性值匹配)
<?xml version="1.0" encoding="UTF-8"?>
<products inbound.code.version="" schema.version="" xslt.version="0" hierarchy.type="provisioner" hierarchy.remap="emea" hierarchy.language="en" hierarchy.country="eu" hierarchy.translation="en" hierarchy.depth="product" remap="product" depth="0">
<product.type name="myprod" translation="myprod" change="modified" oid="84609819" oid.2="84609819" common.oid="3709945" remap="category" depth="1">
<category name="myprod Adapters" translation="myprod Adapters" change="modified" oid="84609824" oid.2="84609824" common.oid="3710111" remap="category" depth="2">
<sub.category name="myprod Ethernet Adapters" translation="myprod Ethernet Adapters" change="modified" oid="81995406" oid.2="81995406" common.oid="1844132" remap="category" depth="3">
<big.series name="Nova myprod Ethernet Adapters" translation="Nova myprod Ethernet Adapters" change="modified" oid="81996409" oid.2="81996409" common.oid="496741" remap="category" depth="4">
<small.series name="Nova myprod Dual NC370i Multifunction Network Adapter" translation="Nova myprod Dual NC370i Multifunction Network Adapter" change="modified" oid="81997928" oid.2="81997928" common.oid="496742" remap="category" depth="5">
<model name="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" translation="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" change="modified" oid="82020916" oid.2="82020916" common.oid="496746" remap="category" depth="6">
<product name="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" translation="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" number="product1" change="modified" oid="64857725" oid.2="64857725" common.oid="496743" remap="product" depth="7"/>
</model>
<model name="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" translation="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" change="modified" oid="82020916" oid.2="82020916" common.oid="496746" remap="category" depth="6">
<product name="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" translation="Nova BL20p G3 Dual NC370i Multifunction Network Adapter" number="product2" change="modified" oid="64857725" oid.2="64857725" common.oid="496743" remap="product" depth="7"/>
</model>
</small.series>
</big.series>
</sub.category>
</category>
</product.type>
</Nova.products>
我必須輸入一個產品編號爲通過Java搜索參數,如果該產品的編號一致「通過Java 輸入的產品數量在深度=」 = 7" ,那麼我必須讓common.oid屬性值爲depth =「6」
感謝您的回覆..... – user3109713