Naga Venkata Pradeep Namburi

Greenhorn
+ Follow
since Apr 04, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Naga Venkata Pradeep Namburi

Hi,

I came across a queer incident today. When i tried to invoke a servlet, browser is downloading a file instead of executing it. I was able to execute the servlet in one of my colleague's systems. Is there any settings in browser level or system level which could induce such behaviour.

Thanks,
N.N.V.Pradeep
14 years ago
Hi All,

I've completed OCBCD on May 5th.

Thanks,
N.N.V.Pradeep.
15 years ago
Hi Paul,

Sorry, yesterday I did not post the code I was using . Please find the code I have used to generate the xml.




This code is giving the output
<?xml version = '1.0' encoding = 'UTF-8'?>
<MyOne xmlns:xsi="http://www.meme.com/mynote/v1">
<MyName>EEE</MyName>
<MyExtension>NotesExtension</MyExtension>
<MyText>This is notes</MyText>
</MyOne>


One of the options I tried was to remove the setAttributeNS call for root and use it for each child element. I was getting the following xml as output.

<?xml version = '1.0' encoding = 'UTF-8'?>
<MyOne>
<MyName xmlns:xsi="http://www.meme.com/mynote/v1">EEE</MyName>
<MyExtension xmlns:xsi="http://www.meme.com/mynote/v1">NotesExtension</MyExtension>
<MyText xmlns:xsi="http://www.meme.com/mynote/v1">This is notes</MyText>
</MyOne>

My requirement is to generate xml with namespace present in root and child elements.

Are you just complaining because the namespace declarations are in the root element? An element inherits its namespaces from its parent unless it overrides them with other namespace declarations, you know.



No i'm not complaining that namespace declaration is in root element. Ya, i know that child elements inherit the namespace of enclosing parent.

I just want to know if there is a way to generate the xml with the namespace being displayed.

And I feel that this has nothing to do with the way I'm creating xml.

I was just wondering if there might just be an option I would have to enable while transforming the xml and outputting it so that it might display the namespace for root element and child elements.
Hi,

I need to display namespace for each element in the xml generated using DOM.

for eg:
<?xml version = '1.0' encoding = 'UTF-8'?>
<MyOne xmlns:xsi="http://www.meme.com/mynote/v1">
<MyName xmlns:xsi="http://www.meme.com/mynote/v1">EEE</MyName >
<MyExtension xmlns:xsi="http://www.meme.com/mynote/v1">MyExtension </FileExtension>
<MyText xmlns:xsi="http://www.meme.com/mynote/v1">This is notes</MyText >
</MyOne>

When i create the xml, i'm providing the namespace as an attribute using the setAttribute method on root element.
If i print this xml, i'm not seeing namespace for each tag. Only the root is having the namespace.

If i omit the namespace attribute for root and set it for each element seperately, i'm able to see the namespace only for the individual elements but not the root element.

Can you help me in wiriting the code which will display namespace for all the elements please?

Thanks,
N.N.V.Pradeep.
Mock exam is much tougher than the real one. Atleast that is what i felt. HFSJ says it's only little tougher but actually it's a lot tougher.
Hi,

I've completed SCWCD yesterday.

(HFSJ mock exam really scared me!!)

Thanks,
N.N.V.Pradeep.
Java uses Immutability concept for Strings. Which means that a String is completely immutable. And also is uses the concept of pooling all the strings. So when you use the same string again, instead of creating, it will point to the object already present in the pool.
So why will it be a perfomance improvement if you declare a String (which is being used again and again in your code) as a constant and use it.
(Any how the VM is not going to create another object. It will just pick the one in the pool.)

16 years ago
Hi

I need to expose MyJavaClass as a webservice.

It has a method public void myMethod();

I need to expose it as an operation.

Please let me know how to do this.

When i omit the output tag, it's displaying error in Jdeveloper.

Thanks
17 years ago
Hi Everyone,
Thanks..
17 years ago
Hi,
I need to format a date in ccyyDDD format.
Is there any such format?
Please explain.
17 years ago
Hi,
I've finally cleared SCJP 5.0. But the sad news is that I scored only 69%.

I'm thinking of preparing for SCBCD next.
17 years ago