0

I have a very heavy XML file and I want to parse through it. First I want to open it on my browser and see the information it contains and how it is structured. But when I do that, I cannot scroll down. How can I open only a part of the file, there is repeating information so just opening a part of it could work. Any ideas?

Vasilis
  • 143
  • 8
  • maybe this could help you: https://stackoverflow.com/questions/17217476/how-do-i-display-a-text-file-content-in-cmd – hotfix Jan 17 '20 at 08:57

2 Answers2

1

A good text editor like Notepad++ will open large text files with ease.

DWRoelands
  • 4,671
  • 4
  • 24
  • 38
0

Please don't say "very heavy" or "very big" or "huge": tell us the numbers. For some people, 2Mb is large, for others it is tiny.

Browsers aren't good at this: they like to hold an entire XML file as a tree structure in memory before displaying it (or before transforming it, e.g. using XSLT). For casual inspection of the file, you're best off using a command-line tool like more (though this is not good at handling XML unless it's been formatted with newlines). To extract a part of the file, consider using a streamed XML processing tool such as XSLT 3.0, running it on the server rather than in the browser.

Michael Kay
  • 138,236
  • 10
  • 76
  • 143