Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

javaranch mock question

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone explain why the answer is d)?
When you construct an XML using a DOM enabled Parser, the same parser should be used to process back the XML document when the process involves legacy applications, otherwise it is not necessary to do so.
a) Not really
b) Yes, whenver the process is between legacy
conectivity this is better.
c) You can use SAX enabled parser to fill this
gap.
d) This statement is not a correct one, because DOM is constructed using IDL.
Answer: d.
 
jim yin
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by jim yin:
Could anyone explain why the answer is d)?
When you construct an XML using a DOM enabled Parser, the same parser should be used to process back the XML document when the process involves legacy applications, otherwise it is not necessary to do so.
a) Not really
b) Yes, whenver the process is between legacy
conectivity this is better.
c) You can use SAX enabled parser to fill this
gap.
d) This statement is not a correct one, because DOM is constructed using IDL.
Answer: d.


Why is DOM as a IDL is the reason? Any comments?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think D is the correct answer, since it’s the most specific one.
XML in a nutshell says -

The Document Object Model is intended to be operating system- and language-neutral; therefore all DOM interfaces are specified using the Interface Description Language (IDL) notation defined by the Object Management Group Organization (www.omg.org).


Cheers,
Dan
 
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone please elaborate on what the question exactly means? Sounds very uncomfortable to me.
Thanks.
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It probably means that if you create an XML document using DOM,do you specifically need to use only DOM if you wish to process the data or you can use SAX based parser.
As stated in the d) answer, the question is not correctly written.
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the explanation. But i should confess that i'm still not clear. If we have another look at the question,
When you construct an XML using a DOM enabled Parser, the same parser should be "used to process back the XML document when the process involves legacy applications", otherwise it is not necessary to do so.
I'm not at all clear about what he meant by processing back the XML document when the process involves legacy applications !!!
What does this mean? What is the scenario he is trying to present here?
 
Vasudha Deepak
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this question is trying to test if the person answering it,is aware, that the Document Object Model is intended to be operating system- and language-neutral.
Processing back the XML document may relate to a number of scenarios like a)searching elements/nodes/attributes,b)creating documents,c)creating elements or d)creating attributes.
So the question asks if the document created by DOM enabled parser,can be processed by DOM enabled parser only(in a way becomes vendor specific) or other options for processing could be used.
Indeed this question is making a statement that when a process involves legacy applications,where a document created by DOM enabled parser ,must be processed by the DOM enabled parser only.
Hence,this statement is wrong.
I hope this helps.
Vasudha
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for the explanation. Sounds much better now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic