Creating an XML String with namespace in Java.Please see

I am creating an XML String with the

private String sTradeSizeXML ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +

"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">" +" " +

"xmlns:i=\"http://www.abc.com/common/interests:i\">" +

"<Note>" +

"<i:Level>100000</i:Level>"+

"<i:Size>20000</i:Size>"+

"</Note>"+

"</xsl:stylesheet>";

On execution,it gives me the error:

Fatal Error] :1:183: The prefix"i"for element"i:Level" is not bound.

org.xml.sax.SAXParseException: The prefix"i"for element"i:Level" is not bound.

But I am binding this to i: in the above string ?

So why is it still giving that error?

[1206 byte] By [bhuru_luthriaa] at [2007-11-27 6:49:24]
# 1

How about printing the string so we (and you) can see what's really in it? Trying to hack through all those escape characters is really annoying. It looks to me like what you think is a namespace declaration is really a text node, but it would be much easier to see the actual string. (Hint: System.out.println...)

DrClapa at 2007-7-12 18:23:06 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...