是否有Java庫可以讓您提取/創建XML文檔,因此最終結果是文檔的「準系統」XML結構。使用Java提取XML結構
例
<result>
<rowset name="kills" key="killID" columns="killID,solarSystemID,killTime,moonID">
<row killID="54933226" solarSystemID="31001222" killTime="2016-07-03 22:29:19" moonID="0">
<victim characterID="93811169" characterName="Madcat326" corporationID="98008818" corporationName="Haight Industries LLC" allianceID="0" allianceName="" factionID="0" factionName="" damageTaken="63039" shipTypeID="17918" x="59788513854.179" y="-13687850177.3741" z="157817245029.115" />
<rowset name="attackers" columns="characterID,characterName,corporationID,corporationName,allianceID,allianceName,factionID,factionName,securityStatus,damageDone,finalBlow,weaponTypeID,shipTypeID">
<row characterID="91316135" characterName="Celeo Servasse" corporationID="98134538" corporationName="Wormbro" allianceID="0" allianceName="" factionID="0" factionName="" securityStatus="-1.0646369409683" damageDone="7825" finalBlow="1" weaponTypeID="3520" shipTypeID="12003" />
<row characterID="95273329" characterName="Mupoc Kashuken" corporationID="98134538" corporationName="Wormbro" allianceID="0" allianceName="" factionID="0" factionName="" securityStatus="-0.2" damageDone="16656" finalBlow="0" weaponTypeID="31882" shipTypeID="12023" />
</rowset>
<rowset name="items" columns="typeID,flag,qtyDropped,qtyDestroyed,singleton">
<row typeID="394" flag="20" qtyDropped="1" qtyDestroyed="0" singleton="0" />
<row typeID="24427" flag="32" qtyDropped="0" qtyDestroyed="1" singleton="0" />
<row typeID="2446" flag="87" qtyDropped="1" qtyDestroyed="1" singleton="0" />
<row typeID="28209" flag="87" qtyDropped="2" qtyDestroyed="0" singleton="0" />
</rowset>
</row>
</rowset>
</result>
將重建爲類似
<result>
<rowset name="kills" key="killID" columns="killID,solarSystemID,killTime,moonID">
<row killID="54933226" solarSystemID="31001222" killTime="2016-07-03 22:29:19" moonID="0">
<victim characterID="93811169" characterName="Madcat326" corporationID="98008818" corporationName="Haight Industries LLC" allianceID="0" allianceName="" factionID="0" factionName="" damageTaken="63039" shipTypeID="17918" x="59788513854.179" y="-13687850177.3741" z="157817245029.115" />
<rowset name="attackers" columns="characterID,characterName,corporationID,corporationName,allianceID,allianceName,factionID,factionName,securityStatus,damageDone,finalBlow,weaponTypeID,shipTypeID">
<row characterID="91316135" characterName="Celeo Servasse" corporationID="98134538" corporationName="Wormbro" allianceID="0" allianceName="" factionID="0" factionName="" securityStatus="-1.0646369409683" damageDone="7825" finalBlow="1" weaponTypeID="3520" shipTypeID="12003" />
</rowset>
<rowset name="items" columns="typeID,flag,qtyDropped,qtyDestroyed,singleton">
<row typeID="394" flag="20" qtyDropped="1" qtyDestroyed="0" singleton="0" />
</rowset>
</row>
</rowset>
</result>
或者我怎麼可以提取/創建XML文檔的結構?
如果這個過程被稱爲別的東西,請讓我知道。
您的意思是你想要生成一個模式? – Paddyd
這聽起來並不完全錯誤,我真正想要的是能夠獲取XML文檔並獲得其構建結構。 –