• 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to read XML file ?

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one XML file which have lot of data and one DB column file .
How can i open this XML file in readable format that is .... user can view data saved in XML file
DB column file have data like
name[profession[place
XML file have
anil[IT[delhi[sanjay[IT[LA
thanks
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How exactly do you want to display the XML and where?
 
sandeep balyan
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all thanks for your reply ,

This is a file named as database column db.txt
ID]A.NAME]E.NAME]SEX]NATIONALITY.
Data file i.e in XML format is like data.xml
ID]A.NAME]E.NAME]SEX]NATIONALITY
1234] ]Anil kumar] M]USA]

I want to load this file to database .AS we want to see report of all data .
or read it in HTML format .
TIA
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. First of all, I'd suggest you should try to search this forum with keywords "xml jdbc" or "xml database". That should give you more than enough of discussions about moving data between XML documents and a database.
Generally speaking, there are two approaches to read stuff from an XML file and insert it into the database. The first one is to use a mapping tool that does all the work for you. I can't name such a tool, however. The other is to write your own code for reading records from the XML file and inserting them into the database.
The second approach, in pseudo-code, would look something like:
 
"To do good, you actually have to do something." -- Yvon Chouinard
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic