Ich bin ziemlich neu in R und versuche, eine XML-Datei zu lesen und in XP mit einem Datenrahmen in R umzuwandeln. Ich habe eine Lösung gefunden, die die Datei in eine Liste verwandelt, von wo aus ich in der Lage wäre, damit umzugehen. Allerdings muss mein Programm relativ schnell laufen. Ich habe das Tutorial auf w3school.com überprüft (http://www.w3schools.com/xsl/xpath_nodes.asp)on XPath, aber sie erklären nicht die Notation, die ich in meiner XML-Datei finden. Ich möchte einen Datenrahmen mit den verschiedenen Kunden und ihre Attribute. Der Anfang der Datei ist nicht in meinen Berechnungen benötigtXML-Knoten-Notation (XPath zu Dataframe in R)
nach einem Auszug aus der Datei ist:.?
$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"/>
Wie verweise ich auf jeden Kunden sind sie ein Attributknoten, ein Attribut