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 Threaded View
Hive >> mail # user >> Hive XPATH query issue


Copy link to this message
-
Hive XPATH query issue
Hi All,

I am trying to parse the below xml file but I am getting invalid expression
error.Please help me with this.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://services.intuit.com/accountant/v1"
targetNamespace="http://services.intuit.com/accountant/v1"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:include schemaLocation="base.xsd"/>
<xs:complexType name="Firm">
<xs:complexContent>
<xs:extension base="Entity">
<xs:sequence>
<xs:element name="Organization" type="Organization"/>
<xs:element name="FirmAssociations" type="FirmAssociatedEntities"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>

select xpath(table_model,'complexType/*/text()') from xpath_table;
I would like to have the below output

Firm|Organization
Firm|FirmAssociations

Thanks in advance
Krishnan

 
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