我對R來說比較新,並且正在嘗試使用XPath讀取XML文件並將其轉換爲R中的數據幀。我已經找到了一個解決方案,將文件轉換成我將能夠處理它的列表。但是,我需要我的程序運行速度相對較快。 我已經在w3school.com上檢查了這個教程(http://www.w3schools.com/xsl/xpath_nodes.asp)on XPath,但是他們沒有解釋我在XML文件中找到的符號 我想創建一個包含不同客戶及其屬性的數據框文件的開始不需要在我的計算XML節點表示法(R中的XPath到數據框)
下面是該文件的摘錄:?
$config
<config>
<competition id="0" name="0" pomId="1.3.1-SNAPSHOT" timeslotLength="60" bootstrapTimeslotCount="336" bootstrapDiscardedTimeslots="24" timeslotsOpen="24" deactivateTimeslotsAhead="1" minimumOrderQuantity="0.01" timezoneOffset="-6" latitude="45" simulationRate="720" simulationModulo="3600000">
<description/>
<simulationBaseTime>
<iMillis>1255132800000</iMillis>
</simulationBaseTime>
<broker>default broker</broker>
<customer id="4097" name="HighIncome-2_8" population="1" powerType="ELECTRIC_VEHICLE" customerClass="SMALL" controllableKW="-3.3" upRegulationKW="-3.3" downRegulationKW="3.3" storageCapacity="85.0" multiContracting="false" canNegotiate="false"/>
<customer id="4100" name="HighIncome-2_9" population="1" powerType="ELECTRIC_VEHICLE" customerClass="SMALL" controllableKW="-3.3" upRegulationKW="-3.3" downRegulationKW="3.3" storageCapacity="60.0" multiContracting="false" canNegotiate="false"/>
<customer id="4103" name="HighIncome-2_10" population="1" powerType="ELECTRIC_VEHICLE" customerClass="SMALL" controllableKW="-3.3" upRegulationKW="-3.3" downRegulationKW="3.3" storageCapacity="60.0" multiContracting="false" canNegotiate="false"/>
<customer id="4106" name="HighIncome-2_11" population="1" powerType="ELECTRIC_VEHICLE" customerClass="SMALL" controllableKW="-3.3" upRegulationKW="-3.3" downRegulationKW="3.3" storageCapacity="85.0" multiContracting="false" canNegotiate="false"/>
如何我指的是每個客戶是他們的屬性點,屬性