Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. hi, Please tell me how we can using java to read and write to XML file for a web application : )

hi, Please tell me how we can using java to read and write to XML file for a web application : )

Scheduled Pinned Locked Moved XML / XSL
javadatabasexml
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abiisalwayshappy
    wrote on last edited by
    #1

    My exercise is using Eclipse to write a web application, and requirement is using XML to write database. Please show me how, thanks so much! : )

    G 1 Reply Last reply
    0
    • A abiisalwayshappy

      My exercise is using Eclipse to write a web application, and requirement is using XML to write database. Please show me how, thanks so much! : )

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      Sorry, I cannot answer your question since it is so broad. Please, use the following link to start your educational journey: http://www.google.com/Top/Computers/Programming/Languages/Java/XML/[^]

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      A 1 Reply Last reply
      0
      • G George L Jackson

        Sorry, I cannot answer your question since it is so broad. Please, use the following link to start your educational journey: http://www.google.com/Top/Computers/Programming/Languages/Java/XML/[^]

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        A Offline
        A Offline
        abiisalwayshappy
        wrote on last edited by
        #3

        hihi i'm a newbe in Java. If u don't mind, please show me basic code to create an XML file (i understood XML structure), how to retrieve data from this file and write data to it. I need to develop my application in "Eclipse.exe". Follow your instruction i read on "http://developerlife.com/xmljavatutorial1/default.htm" and see this coding: import com.sun.xml.tree.*; import org.w3c.dom.*; You must have the a String URL of the XML document before you can instantiate a DOM object from it. Assume that an XML file called AddressBook.xml is at the following URL: http://beanfactory.com/xml/AddressBook.xml. Here is the code to create a DOM object from this URL: try { String url = "http://beanfactory.com/xml/AddressBook.xml"; Document doc = XmlDocumentBuilder.createXmlDocument(url); } catch(Exception e){} But i can not download Sun's parser or IBM's parser. Can u tell me another way : ) -- modified at 1:55 Tuesday 19th December, 2006

        G 1 Reply Last reply
        0
        • A abiisalwayshappy

          hihi i'm a newbe in Java. If u don't mind, please show me basic code to create an XML file (i understood XML structure), how to retrieve data from this file and write data to it. I need to develop my application in "Eclipse.exe". Follow your instruction i read on "http://developerlife.com/xmljavatutorial1/default.htm" and see this coding: import com.sun.xml.tree.*; import org.w3c.dom.*; You must have the a String URL of the XML document before you can instantiate a DOM object from it. Assume that an XML file called AddressBook.xml is at the following URL: http://beanfactory.com/xml/AddressBook.xml. Here is the code to create a DOM object from this URL: try { String url = "http://beanfactory.com/xml/AddressBook.xml"; Document doc = XmlDocumentBuilder.createXmlDocument(url); } catch(Exception e){} But i can not download Sun's parser or IBM's parser. Can u tell me another way : ) -- modified at 1:55 Tuesday 19th December, 2006

          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          These parsers might be available to you: http://xerces.apache.org/[^] or http://www.jclark.com/xml/[^] Also, I am really a C++ programmer with a little Java programming knowledge. So, I cannot really give a good example using Eclipse.

          "We make a living by what we get, we make a life by what we give." --Winston Churchill

          A 1 Reply Last reply
          0
          • G George L Jackson

            These parsers might be available to you: http://xerces.apache.org/[^] or http://www.jclark.com/xml/[^] Also, I am really a C++ programmer with a little Java programming knowledge. So, I cannot really give a good example using Eclipse.

            "We make a living by what we get, we make a life by what we give." --Winston Churchill

            A Offline
            A Offline
            abiisalwayshappy
            wrote on last edited by
            #5

            hihi me too. I use C as my main language, but my new project using Java and Japanese. So i must try so much :) Arigato :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups