• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with Large XML file.  RSS feed

 
Marcelo DeOliveira
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a large xml file that I need to upload to a IBM Mainframe. I would like to extract the data that I need, create a plain text file and upload to mainframe. The file i got does not include processing instructions. Is there a way to create do it without SAX? Thank you guys!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Extracting selected bits of text from an XML formatted file to plain text could be done with plain Java IO and String methods. This could be easy if the input XML is in a very regular line by line format with a simple hierarchy.

It would be like any other text processing problem - read a line, look for markers, extract text, write text to file.

Now if there is a complex hierarchy of XML elements or the formatting does not lend itself to line-by-line reading, you might reconsider using SAX.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!