[JDEV] Newbie Question: What's so invalid about my XML?
Darryl G. Wright
darrylwright at canada.com
Fri May 3 21:45:19 CDT 2002
Hi there,
I have been going through the Programmers Reference and wrote a small
application just to poke the server and get a response back. I successfully
opened the port and fired off the following:
string sXML( "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" );
sXML.append( "<stream:stream to=\"jabber.org\" " );
sXML.append( "xmlns=\"jabber:client\" " );
sXML.append( "xmlns:stream=\"http://etherx.jabber.org/streams\">" );
s.send( sXML.c_str(), sXML.length() );
this is exactly what's listed in all the examples I've seen to open up a
stream. I also tried single quotes, but what I get back, no matter what
server I tried is:
<stream:error>Invalid XML.</stream:error>
I know this is one of those things where I am missing something very simple
and very key but if someone could help me get over this little hirtle, I'd
really appreciate.
Cheers,
Darryl
---
"I have not failed. I've just found 10,000 ways that won't work." - Thomas
Alva Edison (1847-1931)
More information about the JDev
mailing list