File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating xml from file system

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to construct an xml with file system.That is i have c:/temp and temp contains directories,subdirectories and files. I am trying to construct xml representing this file system using DocumentBuilderFactory, but facing some issues in this. Can anyone tell me, how can i do that.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you going about it? What issues are you facing? TellTheDetails
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13049
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would start by creating one or more example XML documents with a text editor so you can work out all the element names and hierarchical organization.

Once you have the hierarchy worked out, the major logic flow of the program should become apparent.

Bill
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to read a directory recursively but not able to construct xml corresponding to that.
code to recursively traverse a directory :


Please help to construct xml of same structure as a directory. >
 
Paul Clapham
Sheriff
Pie
Posts: 20208
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have any code at all which is producing XML there. So it's pretty hard to fix what you have so far. And we don't want to do your work for you.

Why not start by explaining which methods you want to use to produce XML. Do you want to produce a DOM? Do you want to produce a string containing XML? Or what?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic