Tony Sidaway wrote:
The following is a shell session using the lynx browser to illustrate the problem. Sensitive data has been blanked out. The second browser invocation is identical to the first except for "&format=xml", but instead of returning xml it returns only blank lines.
tony@home:~$ lynx -post-data http://en-wikipedia.org/w/api.php action=login&lgname=USERNAME&lgpassword=PASSWORD
You are looking at the HTML representation of the XML format. HTML is good for debugging, but probably is not suitable for your application. See [1]complete documentation, or [2]API help for more information.
<?xml version="1.0"?>
<api> <login result="Success" lguserid="XXX" lgusername="USERNAME" lgtoken="TOKEN" cookieprefix="enwiki" sessionid="SESSIONID" /> </api>
References
tony@home:~$ lynx -post-data http://en-wikipedia.org/w/api.php action=login&lgname=USERNAME&lgpassword=PASSWORD&format=xml
tony@home:~$
& is a special character for the shell. Are you quoting it? (the easiest way, placing single quotes around the text) If you posted on the second invocation to en-wikipedia.org instead of en.wikipedia.org that could matter, too.