Guru Vasu

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

Recent posts by Guru Vasu

....

nice. world is normal again. Thank you Vinoth
Hi,

I found the following question in Oracle's site sample questions section. Posting the url in a code tag as it has the word " p l s" in it.




The answer that they gave sounds wrong. Am I wrong in thinking A to be the answer for the following question?


OBJECTIVE: 7.2: Given an example of a class and a command-line, determine the expected runtime behavior.
10) Given:

Which command-line invocation will produce the output found?
a) java -Dx=y x y z
b) java -Px=y x y z
c) java -Dx=y x x y z (*)
d) java -Px=y x x y z
e) java x x y z -Dx=y
f) java x x y z -Px=y

REFERENCE:
API for java command
Option C is correct. -D sets a property and args[1] is the second argument (whose value is y)



Thanks in advance
lol .... good catch. I guess I wont buy it from there then
13 years ago
Thank you Rahul



The above produced the desired output.

Could you please check and reply if I am doing what you asked me to? and if I can cutshort any of the above calls?

Thank you again Rahul

Guru
Hi,

I am new to XML and I am trying to create an xml document.



In java to form the above document I did the following:



After which I am basically stuck - how would I create a node inside the document (I clearly see this is basic and simple) .... but whichever tutorial I go through wont give me an answer for this (there are parsers to read and convert xmls to DOM back and forth - but how would I form just a simple xml

I am expecting something like



I do not want to use external jars/libs/apis like XStream or castor to do the above.

How would I do the above?

thank you
Guru
[ November 22, 2006: Message edited by: Guru Vasu ]
If you are into J2EE - the J2EE tutorials that can be downloaded from the official sun website would mostly cover all the concepts that you would need to know in using xml with Java and it would cover concepts of XML, XSLT and various others....

Its free and its downloadable. Give it a try.

Good luck
Yes you are right .. took a while for me to figure that out - but commented out the code (//Element rootElement = doc.createElement(root);) and I was able to append the node to the doc.

but now I am getting a java.lang.UnsupportedException - when Spring tries to render the page out - which is generated from NodeAdapter(from Domify jar)

Hi Paul,

Thank you for your reply. Just updated my profile.

the error that I was getting was WRONG_DOCUMENT_ERR: A node is used in a different document -- which I just managed to fix by chagning my code to


from



But got a java.lang.UnsupportedOperationException. Here is what I am trying to do.

Extending AbstractXsltView, I am trying to domify my objects and add it to the model object

Here is my code



Do you (or anyone) know of a way to achieve the same in any fashion. Spring website provides an example which works for me (but its too simple for me to use it to comprehend the problem in the above situation).

Thank you for your help in advance
Guru
Hi,

I am new to XML/XSLT and I am trying to do the following and I receive a WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.

I was able to see the logic behind it and use doc.importNode(child, true) and that didnt work.

I would appreciate any help/advice.





thank you