• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is this XML???

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
using HTML/JS, i have created a new window that contains thet contents as given below:

<desc>
<name>sam</name>
<age>23</name>
</desc>

in my form, i had a set of select tags with options. once the user has made his selections, i use a function named change() with the pseudo code as given below:


the result of executing this function is the set of tags as given above.
now my questions are:
(1) can i say that i have created a XML file???
(2) if it is a XML file, without using a parser, can i extract the value of the name and age tags using servlets or JSP?
thanks in advance
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

(1) can i say that i have created a XML file???


No, but you can say that you have created an XML document...

(2) if it is a XML file, without using a parser, can i extract the value of the name and age tags using servlets or JSP?

No, you can't, since the window you created with JavaScript gets created completely on the client-side -- the server doesn't know that the browser has executed the JavaScript function.

If you want to send the XML document for processing on the server-side, you should turn to our HTML/JavaScript forum for help in doing that.
 
Sri Sar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
thank u very much for the reply. can u give me the difference between a XML document and a XML file??
thanks in advance
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sri Sar:
can u give me the difference between a XML document and a XML file??


An XML document is "any" instance of an XML tree while an XML file is a file containing an XML document.

For example,
String foo = "<?xml version='1.0'?><foo><bar/></foo>";
can be called an "XML document" but it's not an "XML file" until you've physically written that XML data into a file in the file system.
 
Sri Sar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi lasse,
thank u very much for explaining the difference between an XML file and an XML document,
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic