473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to make HTML contnent with same tag in each line using Sed

56
I am looking in a an HTML file to modify for the purpose of easy parsing . I need to put each item of HTML after body to separate line.

eg : my current HTML file is

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  4.   <head>
  5.     <meta content="text/html; charset=utf-8" http-equiv="Content-type" />
  6.     <meta name="ncc:files" content="78" />
  7.   </head>
  8.   <body>
  9.     <h1 class="title" id="h1"><a href="001.smil#txt4">ABOUT DAISY</a></h1>
  10.     <h1 class="section" id="h7">
  11.       <a href="002.smil#txt10">Cover</a>
  12.     </h1>
  13.     <span class="page-normal" id="p13">
  14.       <a href="002.smil#txt15">1</a>
  15.     </span>
  16.     <h1 class="section" id="h18">
  17.       <a href="003.smil#txt21">Swadesaabhimaani, K. Kelappan, Muhammad Abdul Rahiman</a>
  18.     </h1>
  19.     <span class="page-normal" id="p24">
  20.       <a href="003.smil#txt26">2</a>
  21.     </span>
  22.     <span class="page-normal" id="p33">
  23.       <a href="003.smil#txt35">3</a>
  24.     </span>
  25.     <h1 class="section" id="h38">
  26.       <a href="004.smil#txt41">Title</a>
  27.     </h1>
  28.     <span class="page-normal" id="p45">
  29.       <a href="004.smil#txt47">4</a>
  30.     </span>
  31.     <h1 class="section" id="h50">
  32.       <a href="005.smil#txt53">Publication</a>
  33.     </h1>
  34.     <span class="page-normal" id="p69">
  35.       <a href="005.smil#txt71">5</a>
  36.     </span>
  37.     <h1 class="section" id="h74">
  38.       <a href="006.smil#txt77">K. Ramakrishnapilla</a>
  39.     </h1>
  40.       </body>
  41. </html>
  42.  

required html must be same line without line split after <body> tag .

means each tag content must come in same line without split. Please advise How it can do with Sed...

Waiting fast reply...

Thanks

Anes
Jan 19 '16 #1
0 1201

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: bjam | last post by:
Hi, I am hoping someone can help with this I am assuming it is pretty basic but I don't see anything that jumps out at me at how to do this. Is there a way to have all the items output from the...
0
by: Vilmar Brazão de Oliveira | last post by:
Hi, I am having err when creating link to each line of grid at LINE 38. My objective in asp.net is: each line can be linked to page with your parameters as VB 5/6, Delphi 5/6/7, etc.... See the...
5
by: dean | last post by:
sSQL = " update SELECTED_NODES " " set LABEL_S = 'Y' " " where NODE_I in " " ( " " select NODE_I " " from " " ( " " select ONODE_I NODE_I from link " " union all "
3
by: jonathan184 | last post by:
Hi I am trying to get to values on each line of a text file and write to another file I am still new to this I tried to writing the following below Just to let you know i am still a newbie. ...
0
by: chandan agarwal | last post by:
hi I have been given the task of building vc++ programs at the command line using make software. i have installed gnu make-3.81 version. i was able to build and run makefiles for turbo c++. but...
12
by: Matt F | last post by:
I'm creating simple ping script that prompts a user for various parameters. However, I would like each line of the ping displayed as it is received. Currently, the result isn't displayed until...
7
by: Bob | last post by:
http://robertlindsay.blogspot.com/2008/04/how-to-make-html-code-show-up-on.html
6
by: kronus | last post by:
Hi everyone, This is my first time posting to the UNIX form and it might be a strange request, but I believe I have most of the pieces. Here's the overall goal -- I am trying to find the links...
2
by: Peter9588 | last post by:
I am trying to read in every line from a given file and check (amongst other things) that the 3rd character of every line is a ';' (a semi colon). The files i make to go into my database needs to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.