Home

Searching XML Technologies

e.g. 'saxon' or 'xml'

Table of Contents


News
Last changed Jun 17, 2008 15:48 by Arun Batchu
Labels: xquery, xml, dom4j, xhtml, junit

Querying xhtml using XPath and Dom4J:

public void testRetrieveCurrentDashboard() throws IOException, [DocumentException], [LoginException] {
cc.loginToCrvApp(testUser,testPassword);

//GET a proper xhtml document
[GetMethod] getMethod = cc.makeGetCall(cc.getHttpClient(), "/crv/dashboard", new [HashMap]());

String responseBodyAsString = getMethod.getResponseBodyAsString();

Map<String, String> map = new [HashMap]<String, String>();
map.put("c","http://niem.</String,></String,>...

Posted at Jun 17, 2008 by Arun Batchu | 0 comments
Last changed Jun 16, 2008 22:38 by Arun Batchu
Labels: xquery, xml, spring

Our attempt to find out all the eXist database xqueries that are being used via Spring framework config...

xquery version "1.0";
declare default element namespace "http://www.springframework.org/schema/beans";
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance";
declare namespace schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";

let $doc := doc("beans....

Posted at Jun 12, 2008 by Arun Batchu | 0 comments
Last changed Jun 12, 2008 16:45 by Arun Batchu
Labels: xquery, xml
Posted at Jun 12, 2008 by Arun Batchu | 0 comments
Labels: xquery, tip, trip

While XQuerying eXist DB collections, We got tripped, fell and finally got up.
This works

This does not work (not explicitly saying position()=last()) on collections. The trip-wire was that you get the correct answer on a single document but not on collections....

Posted at Dec 18, 2007 by Arun Batchu | 0 comments

When I try to maximise the leverage of XML's precision and flexibility, I find that data-encapsulation is what I tend to maximise.

Once the documents become encapsulated, the information-content of each XML document increases, the relation-ships are expressed locally, complete-ness emerges and hence I am able to take actions based on the information-content.In several instances the XML documents- especially that 'batch' a bunch of other documents, I see mini-databases being shipped around....

Posted at Nov 21, 2007 by Arun Batchu | 0 comments
Last changed Nov 21, 2007 10:35 by Arun Batchu
Labels: great, tool, library, xml, swissarmyknife, dom4j

Dom4J rocks for XML processing - Close to specification, open source, free, extremely performant and very elegant, intuitive API alongwith freely available documentation of examples as well as usage. And very efficient for parsing gigantic xml documents (how big? how about 450 MB?). There is a slight memory leak when doing XPath expressions that, at this enormous scale,...

Posted at Oct 31, 2007 by Arun Batchu | 0 comments
Last changed Oct 31, 2007 13:59 by Arun Batchu

I ran into an interesting problem where I wanted to specify a relative file path in a <code>file:</code> scheme (don't ask me why on earth would I want to do that). Here is what worked ( from an answer by ElliotteRustyHarold - a genius).

<?xml version="1.0" encoding="UTF-8"?>
<[CollectionSubmissionAcknowledgement]>
<[CrvCollectionDocumentUrl]>file:mule-esb/batch/data/eCRV-instance.</[CrvCollectionDocumentUrl]></?xml></[CollectionSubmissionAcknowledgement]>...

Posted at Oct 31, 2007 by Arun Batchu | 0 comments

Labels

 
(None)