Paul Clapham wrote:As for "urgent", please read this: EaseUp.
Let me point out that there are XML documents which can't be expressed as JSON documents. XML is just more complex than JSON is. But having said that, the way I would approach this would be to use the google keywords "xml convert json" and see what turns up.
Or did you already try that? What did you try so far?
Ravi Kiran Va wrote:Hi ,
I am trying to use JSON in my project i am seeing that JSONObject can be from two packages .
Please tell me what is the difference between them
James Sabre wrote:
jyothsna ananthula wrote:
James Sabre wrote:Looks to be a method in your servlet since it is not explicitly associated with an object or a class instance.
hm,but i read that if we want to create a servletContext object we will use directly getServletContext() ex: ServletContext stxt=getServletContext();
but getServletContext() method is available in Servletconfig Interface. so this extractFromRequest() is also same as it is ....?
and can you tell me ServletConfig is a interface and even we are using in servlet class we will write like init(ServletConfig s){}
and in while Calling getServletContext() we are not using any object but we know that its by default called by ServletConfig object.
i didnt get this concept much.
Sorry but I don't see how that relates to extractFromRequest() . To find method extractFromRequest() just look at the source code for your Servlet or maybe a base class from which your Servlet is derived. To understand Servlet concepts go though several of the many Servlet tutorials.
James Sabre wrote:Looks to be a method in your servlet since it is not explicitly associated with an object or a class instance.
g tsuji wrote:You can google for oracle xdk developer's guide. For 9i release 2 (9.2), this is the link:
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96621.pdf
whereas for 11g release 1 (11.1), this:
http://download.oracle.com/docs/cd/E15523_01/appdev.1111/b28394.pdf
You can too find 10g's.
If you care to read, you will discover that generateXSL() begins to appear from 10g. For 9i version, it is not yet entered into the spec.
Other than that I don't have anything to share on how to read and do. That sounds terribly pretentious.
g tsuji wrote:>will get same output for both methods.is it rgt?
Apart from some (unsignificant) ignorable whitespaces related to formatting, they get the same output, an xslt doc.
g tsuji wrote:>and tell me a.generateXSLDoc(),a.generateXSLFile().
What do you mean by that, telling you?
>what is the difference between two methods. i am getting same output for these two.
Watch carefully the .print() method is used following generateXSLDoc() because generateXSLDoc() return an XMLDocument which is the xslt document (itself an xml document). That is the difference and that is also the detail intended to be shown otherwise I wouldn't bother. They by the full line written output of course the same xslt document that is what I want you to see alternative or looking at the same problem at different angle. It is not meant to be read casually.
If the generateXSL() line does not work for your version, just don't use it and comment it out. You have the other two lines to output the same already. It is probably related to the xdk you're using. That's all. You've to read your manual.
g tsuji wrote:>or else tell me code how to use generateXSL(); and where i will get xsl.
If I can recap what I said and condense it to one line:
Have you looked at System.out? (This line is positioned after a.diff() had been called.) If you had not and said it not working or something, there is no reason I am full of joy and say that's cool. I might or I might not be irritated --- that's all your words that have no concern as far as I'm concerned.
If you're not in a position to have a System.out console to look at, you may persist its output to a file for inspection. At the same time, I can show you more options the class exposed for your convenience.
or any of their variants as long as their constructor accepts.
g tsuji wrote:x1 and a are both your notations, not even mine. I don't what you are talking about... a.generateXSL() and x1, can we mix them all up?
Raj Kamal wrote:
This has nothing to do with XML. You have to give a full path and filename when you create the FileWriter object (out).
Please use CODE tags when posting code otherwise it is so very hard to read.
g tsuji wrote:[0]
>here i am not understanding how to see x1, its a xmlDocument.
[1]
>so i want to know the usage of those methods.how can use it.and for ex: in this package
generateXSL
public void generateXSL(java.io.Writer out)
throws java.io.IOException,
java.lang.NullPointerException
You have also member functions which may be more useful in different settings, such as generateXSLDoc() or generateXSLFile()...
These are just for illustration of how to get XMLDocument or XMLDiff perform. I don't see any other way than studying their documentation. Speculation and guessing do not get you far.