Managed Browser, Landmarks, and XPath

In a recent article posted by Chuck, article here, he writes about how the DataChange events happen in the Managed Browser container.  The event is very powerful and allows for actions to be called when a DOM node changes.  I described similar use cases in an article where we constructed a web browser component using XPath.  In that article we show how the managed browser component can use XPath’s to DOM elements so we can extract data out of the current web page at a given URL (the landmark).  In the end, we took the information from one web page and inserted (wired) it into another web page that hosts a basic form.  This uses the dynamic wiring and the property broker message queue to transport the data from one browser to another.  With the combination of XPath’s and Landmarks (regular expression based URL’s), you can create some pretty complex components for large web applications.  Also remember, you can define landmarks that can overlap.  So in short, if your landmark expression (regular expression) is viable for the current page the events and actions will execute – so having many landmark expressions that overlap is actually common.

All of the containers that ship with the product support these landmark concepts and you can even create your own containers based on the public API’s.  Mike Cooper outlines the steps for creating your own container in a wiki article – Creating a Composite Application Container.  He focuses on using Eclipse/SWT for the UI but as you can see from the other container types you can pretty much use any kind of UI technology with this generic framework.

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.