Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Recover xml tags


    I have a destroyed xml file and would like to recover it. Do you know any linux command or script that you do it?
    An example of my file is:

    Hello </a>world<a>
    And would like to change to:

    Hello <a>world</a>


  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Victoria, B.C. Canada
    It's nearly impossible task to programmatically fix a broken XML file, and even more so with HTML, though HTML is more forgiving of errors. If you have one FU'd file you'll spend less time doing it manually then searching for an easier way.

    The developer features of your favorite browser may help you find all the errors.

  3. #3

    Thank you for your reply. I know that it is difficult to recover a destroyed file. In my case, it is not an HTML document. It is a txt file that contains sentences and each sentence contains those kind of tags. Sometimes, the result is not correct, so I need to reorder them.

    I will try to find another solution, probably using sed or awk commands.


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts