HBase REST Filter ( SingleColumnValueFilter )

Filter fields in the Scanner XML are strings formatted as JSON. Since the JSON for the filter has many quotes in it, I recommend using a separate file for curl’s -d parameter, to avoid the single quote. curl -v -H “Content-Type:text/xml” -d @args.txt http://hbasegw:8080/table/scanner Where the file args.txt is: <Scanner startRow=”cm93MDE=” endRow=”cm93MDg=” batch=”1024″> <filter> { … Read more

Splitting XML into multiple files with XSLT

Responding to your comment on @Dimitre’s answer… You wrote, <xsl:template match=”https://stackoverflow.com/”> <xsl:for-each select=”elem/file”> <xsl:result-document method=”xml” href=”https://stackoverflow.com/questions/4036233/file_{@id}-output.xml”> <xsl:copy-of select=”.”/> </xsl:result-document> </xsl:for-each> </xsl:template> This doesn’t quite match your XML, which has rootelem as an outermost element, and your comment says root as an outermost element. You probably want something like this: <xsl:template match=”/root”> <xsl:for-each select=”elem/file”> <xsl:result-document method=”xml” … Read more

XML Schema: Element that can contain elements or text?

I did some research on this a while ago and the only solution I found was to used the mixed attribute: <xs:element name=”field”> <xs:complexType mixed=”true”> <xs:sequence> <xs:element ref=”subfield” minOccurs=”0″ maxOccurs=”unbounded” /> </xs:sequence> <xs:attribute name=”name” type=”xs:string” /> </xs:complexType> </xs:element> This sadly also allows <field name=”test_field_0″> Some text I’m sure you don’t want. <subfield>Some text.</subfield> More text … Read more