Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Pig 0.10 XmlLoader can't handle XML shorthand


+
Zhu Wayne 2013-05-06, 17:04
Copy link to this message
-
Re: Pig 0.10 XmlLoader can't handle XML shorthand
Hi, Zhu:
Just want to clarify your requirement. Shorthand <Seller/> means there is
no data. I guess nothing is normal. What would you expect if there is no
data in XML?

Thanks,
Johnny
On Mon, May 6, 2013 at 10:04 AM, Zhu Wayne <[EMAIL PROTECTED]> wrote:

> Greetings! Did someone encounter the same issue?
>
> Well-formated XML for <Sellers></Sellers> is fine:
>
> grunt> register /usr/lib/pig/piggybank.jar;
>
> grunt> a = load 'sample.xml' using
> org.apache.pig.piggybank.storage.XMLLoader('Sellers') as (doc:chararray);
>
> grunt> dump a;
>
> (<Sellers>
>
>             <Seller SellerName="Leebay-Brothers" SellerRating="3.9"
> SellerPrice="3,499.99" ContactInfo="" ContactPhoneInfo=""/>
>
>           </Sellers>)
>
>  Short-hand XML for <Seller/> is NOT good:
>
> grunt> a = load 'sample.xml' using
> org.apache.pig.piggybank.storage.XMLLoader('Seller') as (doc:chararray);
>
> grunt> dump a;
>
> I got nothing here.
>
+
Zhu Wayne 2013-05-07, 16:24
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB