|
| HTTP Connector (Xpath/Xquery) RTW? |
 |
Fri, 28 Dec 2007 06:54:26 -050 |
Hi - I need to use an HTTP iterator connector. I think that the most
elegant way to use it would be wit Xpath/Xquery. I think that I might
have to write one (scripted) - but before I go there (I hate
re-inventing the wheel) (RTW)....
Has anyone had this need before/ tried it/ got one/ ??
My current solution is an ugly line-parser-based iterator, but it will
break on the first change of the HTTP source pages.
My first glance around at the terrain reveals some Javascript
|
| Post Reply
|
| Re: HTTP Connector (Xpath/Xquery) RTW? |
 |
Mon, 07 Jan 2008 14:46:19 +010 |
Derryck,
you could try using the system bean in TDI which provides methods such as
system.getXPathAPI()
(documented in the TDI javadocs, see the UserFunctions class)
The latter method returns and org.apache.xpath.XPathAPI object.
There are other methods, such as selectNodeIterator, selectNodeList,
orselectSingleNode (they select nodes using an XPath expression from an
XML node)
Finally you may find easy alternatives using the XSLT-based XML parser
documented in the TDI reference guide.
HTH,
Christian
Derryck Lamptey wrote:
> Hi - I need to use an HTTP iterator connector. I think that the most
> elegant way to use it would be wit Xpath/Xquery. I think that I might
> have to write one (scripted) - but before I go there (I hate
> re-inventing the wheel) (RTW)....
>
> Has anyone had this need before/ tried it/ got one/ ??
> My current solution is an ugly line-parser-based iterator, but it will
> break on the first change of the HTTP source pages.
>
> My first glance around at the terrain reveals some Javascript
|
| Post Reply
|
| Re: HTTP Connector (Xpath/Xquery) RTW? |
 |
Wed, 09 Jan 2008 09:33:20 -050 |
Thanks, Christian - I'll give it a shot. I have had good luck with XML
and XPath, but lots of bad luck with HTML and XPath. In this case, my
HTML is really ugly and nasty.
I'll let group know what I found. I had started looking into a package
called HTMLParser (on sourceforge) which looked promising for handling
dirty HTML. I had just been pausing to think about how best to wrap ITDI
around it...
I'll put that on the shelf and check out your suggestion.
Bonne Annee, tout le monde..
--
Thanks, Derryck.
(in frozen Canada)
http://www.linkedin.com/in/DerryckLamptey
Christian Chateauvieux wrote:
> Derryck,
>
> you could try using the system bean in TDI which provides methods such as
> system.getXPathAPI()
> (documented in the TDI javadocs, see the UserFunctions class)
|
| Post Reply
|
| Re: HTTP Connector (Xpath/Xquery) RTW? |
 |
Tue, 15 Jan 2008 08:37:06 +010 |
I feel your pain, Derryck. When I have had to
"read" web pages I always ended up using String
searches and regexp. The XML was too messy for
xmldom parsing.
-Eddie
Derryck Lamptey wrote:
> Thanks, Christian - I'll give it a shot. I have had good luck with XML
> and XPath, but lots of bad luck with HTML and XPath. In this case, my
> HTML is really ugly and nasty.
>
> I'll let group know what I found. I had started looking into a package
> called HTMLParser (on sourceforge) which looked promising for handling
> dirty HTML. I had just been pausing to think about how best to wrap ITDI
> around it...
>
> I'll put that on the shelf and check out your suggestion.
>
> Bonne Annee, tout le monde..
|
| Post Reply
|
|
|
|
|
|
|
|
|
|