G
Geo Cooper
I am just starting to program and am learning by using ruby, so this
question is probably really basic.
I have a a file that I want to put the contents into a sqlite database.
This file is locally saved now, but will eventually be sent by remote
machines for collecting the data from. I will not have to retrieve the
documents, but I will have to figure out how to accept them when they
are sent to me. I have read up a bit on REXML and Nokogiri, but am not
sure where/how to get started.
If someone can give me some pointers on where to start, that would be
great.
Below is a partial sample of what I'm trying to parse. The database
tables correspond to the record names.
Thanks for any help.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE peerfabric SYSTEM "peerfbrc.dtd">
<peerxml peerid="app.001">
<callsummary protocol="0" start="2009-03-07 19:07:05" end="2009-03-07
19:08:03" duration="58" type="0" terminator="0" result="released"
resultcode="" errorcode="" errortext="" watch="n" test="n"
srcip="10.10.2.2" srcport="26483" srcid="10011" dstip="192.168.1.40"
dstport="1720" dstid="50011" callid="278A3456D2021EF0E7E06941F06945D4"
confid="F733C942932A3467C74B489695B18C80" publisher="app.001"
score="99.165" caller="30011" called="70011">
<calldetail srcmac="001C10F635B6" srcname="20011" srcdesc="App
Version 1.7.1" dstmac="0004AC456B46" dstname="60011" dstdesc="App
Version 1.7.1" connected="57370806" totaltime="57372979"
responsetime="2173" alerttime="-1" answertime="2173" teardowntime="1575"
avgtrans="787" netlatency="1874" totalbytes="140337" mediabytes="136944"
totalpackets="1942" mediapackets="1902" lostpackets="0"
signalscore="99.958" mediascore="98.967" srccause="16" dstcause="16"
srclan="10.10.2.2" dstlan="192.168.1.40" />
</callsummary>
</peerxml>
question is probably really basic.
I have a a file that I want to put the contents into a sqlite database.
This file is locally saved now, but will eventually be sent by remote
machines for collecting the data from. I will not have to retrieve the
documents, but I will have to figure out how to accept them when they
are sent to me. I have read up a bit on REXML and Nokogiri, but am not
sure where/how to get started.
If someone can give me some pointers on where to start, that would be
great.
Below is a partial sample of what I'm trying to parse. The database
tables correspond to the record names.
Thanks for any help.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE peerfabric SYSTEM "peerfbrc.dtd">
<peerxml peerid="app.001">
<callsummary protocol="0" start="2009-03-07 19:07:05" end="2009-03-07
19:08:03" duration="58" type="0" terminator="0" result="released"
resultcode="" errorcode="" errortext="" watch="n" test="n"
srcip="10.10.2.2" srcport="26483" srcid="10011" dstip="192.168.1.40"
dstport="1720" dstid="50011" callid="278A3456D2021EF0E7E06941F06945D4"
confid="F733C942932A3467C74B489695B18C80" publisher="app.001"
score="99.165" caller="30011" called="70011">
<calldetail srcmac="001C10F635B6" srcname="20011" srcdesc="App
Version 1.7.1" dstmac="0004AC456B46" dstname="60011" dstdesc="App
Version 1.7.1" connected="57370806" totaltime="57372979"
responsetime="2173" alerttime="-1" answertime="2173" teardowntime="1575"
avgtrans="787" netlatency="1874" totalbytes="140337" mediabytes="136944"
totalpackets="1942" mediapackets="1902" lostpackets="0"
signalscore="99.958" mediascore="98.967" srccause="16" dstcause="16"
srclan="10.10.2.2" dstlan="192.168.1.40" />
</callsummary>
</peerxml>