ciao!!!
ho un file xml che ha la seguente struttura
<virtual-sensor name="MultiFormatTemperatureHandler" priority="10">
<processing-class>
<class-name>gsn.vsensor.BridgeVirtualSensor</class-name>
<init-params />
<output-structure>
<field name="light" type="double" />
<field name="temperature" type="double" />
<field name="packet_type" type="double" />
</output-structure>
</processing-class>
<description>This sensor simulates light and temperature readings
every one second.
</description>
<life-cycle pool-size="10" />
<addressing>
<predicate key="geographical">Sensor 114 @ EPFL</predicate>
<predicate key="LATITUDE">46.520000</predicate>
<predicate key="LONGITUDE">6.565000</predicate>
</addressing>
<storage history-size="5m" />
<streams>
<stream name="input1">
<source alias="source1" sampling-rate="1" storage-size="1">
<address wrapper="multiformat">
</address>
<query>SELECT light, temperature, packet_type, timed FROM wrapper</query>
</source>
<query>SELECT light, temperature, packet_type, timed FROM source1</query>
</stream>
</streams>
</virtual-sensor>
sto sviluppando un programma java che estragga i campi <description>,<addressing> e fin qui tutto bene.. il problema è che nn riesco a prendere i campi del tag <field name="light" type="double" />...dovrei prendere l atributo light,temperature e packet_type...qualcuno sa come si fa?sto usando le librerie dom

Rispondi quotando