Find the answer to your Linux question:
Results 1 to 2 of 2
from the following link http://gdata.youtube.com/feeds/api/videos/cNd4eocq2K0 I can get a xml file however I noticed that there is only 1 line in the file using vim or gedit there is no ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    85

    how to transform one-line xml file into multiple-line format


    from the following link
    http://gdata.youtube.com/feeds/api/videos/cNd4eocq2K0
    I can get a xml file
    however I noticed that there is only 1 line in the file using vim or gedit
    there is no line feeds
    but I see on some articles
    the format is changed into multiple lines

    how can I make the files into multiple-line format
    thanks

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    XML uses <start>...</end> tags to identify components in the file. Multiple lines are not required, so many times you will see this. Most browsers and/or XML editors will happily add new-lines for you, and should have an option to save with new-lines intact. The alternative is to use something like sed to convert the file for you.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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