[jdom-interest] 401 unauthorized, SaxBuilder

Espen Falkevik sp1_falkevik at yahoo.com
Mon Aug 1 00:44:36 PDT 2005


Hi. 
I'm trying to read a HTML page on a server, and to
parse it into a XML-dokument, so that I can use XPath
to extract the elements I want from the page.

The following code does the trick when the server
doesn't demand any authorizaiton:
(The code is written in Jython)

builder2 = SAXBuilder("org.ccil.cowan.tagsoup.Parser")
url = URL(http://10.0.0.1)
doc2 = builder2.build(url)
after this I can use XPath on doc2, to extract the
input and select fields...

My problem is: how can I do the same when the server
demands authentication? (when requesting the page in a
browser I get a pop-up where I write my username and
password). I don't want the user to get this popup, I
only want to declare my username and password as
strings in the program.....


Hope someone can help me

-Espen-


	
	
		
___________________________________________________________

Yahoo! Messenger - NEW crystal clear PC to PC calling
worldwide with voicemail http://uk.messenger.yahoo.com


		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


More information about the jdom-interest mailing list