apache pig - XMLParsing using PIG -
i having sample xmldata in below format.out of want extract values of ichannelid,starttime,endtime,reading value using pig. tried using xmlloader(piggynank.jar) not succeeded.
<channels> <channel> <channelid ichannelid="bd68786865" /> <timeperiod starttime="2015-04-14t07:00:00" endtime="2015-04-15t07:00:00" endread="98790.53" /> <readings> <reading value="0.212" > <readingstatus> <unencodedstatus sourcevalidation="xyz" /> </readingstatus> </reading> <reading value="0.123" > <readingstatus> <unencodedstatus sourcevalidation="xyz" /> </readingstatus> </reading> </readings> </channel> </channels>
can 1 me.
<readings>
tag not closed, therefore xml invalid
Comments
Post a Comment