Sponsored Content
Full Discussion: Commenting xml file lines
Top Forums Shell Programming and Scripting Commenting xml file lines Post 302221229 by scorpio on Monday 4th of August 2008 01:11:42 AM
Old 08-04-2008
Commenting xml file lines

Hi ,

I have a XML file like this

<
Code:
dependency>
      <groupId>fr.xxxx.portail.ear</groupId>
      <artifactId>_xxxEAR</artifactId>
      <version>1.0.0-20xxxxx.xxxxx-x</version>
      <type>ear</type>
    </dependency>

I need to comment single/multiple lines from XML file.
How can i comment using (<-- and -->) , if i want to comment <dependency> tag (allthe 6 lines) and for
<groupId> tag (only one line)

Can any one help me in this .... ?
Thanks in advance ....
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Commenting lines

How to comment a set of lines in a script? we use # to comment a single line , is there ant other cmd to comment a block? (2 Replies)
Discussion started by: rolex.mp
2 Replies

2. Shell Programming and Scripting

Commenting lines

Hi can any body pls help me : I have a file Which Content is like following: p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog ca:3:respawn:/opt/GoldWing/currentPM/local/critagt > /dev/msglog 2<>/dev/msglog ca:3:respawn:/opt/GoldWing/currentPM/local/startcia.sh... (2 Replies)
Discussion started by: Aditya.Gurgaon
2 Replies

3. Shell Programming and Scripting

Commenting lines in a file using SED

Hi, I need to comment the below lines in a file using sed.These are the few lines of the jsp file that need to be commented. if(top.location != location){ top.location.href = location.href; } Using the below command two lines can be commented: if(top.location != location){ ... (9 Replies)
Discussion started by: meetu
9 Replies

4. Shell Programming and Scripting

commenting out lines between two delimiters

Hi All, I am struggling to get my head around the following issue. I am having to comment out lines between two delimiters by placing an asterix in position 7 but retain all lines in the file and in the same order. so for example a file containing: ... ... DELIM1 ... ... DELIM2... (2 Replies)
Discussion started by: Bruble
2 Replies

5. Shell Programming and Scripting

Commenting lines in Shell script

Hi All, I know we can comment by using "#" .... I want to know... is there any way to comment a whole big script easily.... In a file i need to comment more than 15 lines ........ and check the script and un comment back. I am learning VI now so its taking lot of time to comment and un... (4 Replies)
Discussion started by: firestar
4 Replies

6. UNIX for Dummies Questions & Answers

Commenting multiple lines

Hi, Can anyone let me know how to comment multiple lines in VI editor? Many thanks. Regards, Venkat. (3 Replies)
Discussion started by: venkatesht
3 Replies

7. Shell Programming and Scripting

perl: Help with commenting out specific lines

Hi I'm trying to comment out specific lines from /etc/fstab file, for simplicity I'm trying to use perl one liner but it errors out, Below is the Perl oneliner I'm using, perl -wlp -i -e 'BEGIN{$flag=0}if (!/root/) && (!/boot/) && (!/tmpfs/) ) {$flag =1;} elsif (/^$/) {$flag=0} if ($flag)... (2 Replies)
Discussion started by: mbak
2 Replies

8. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

Hi All, I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me. <A>testing_Location</A> <value>LA</value> <zone>US</zone> <B>Region</B> <value>Russia</value> <zone>Washington</zone> <C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies

9. Shell Programming and Scripting

Commenting Multiple lines using Shell Script

I have an xml file which has following code : <abc-ref> <abc-name>abc.efg.hij.klm</abc-name> </abc-ref> I want to comment this whole section out and I have written the following script : (where "hij" is unique string in the file) TEMPFILE=replaceYY.tmp file=hello.xml sed -n... (6 Replies)
Discussion started by: Dish
6 Replies

10. Shell Programming and Scripting

Commenting a block of code in xml where the tags may be similar

I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ? Thanks in Advance <listener> <listener-class>com.pkg1.class1</listener-class> </listener> ......... <listener>... (4 Replies)
Discussion started by: Lakshmikumari
4 Replies
EXIFCOM(1)						      General Commands Manual							EXIFCOM(1)

NAME
exifcom - display or set the UserComment tag contained in a JPEG Exif section SYNOPSIS
exifcom [ -bfinv ] [ -w comment ] [ -s delim ] file ... DESCRIPTION
When invoked without arguments, the exifcom utility displays the contents of the Exif UserComment tag contained in file to the standard output. Otherwise, depending on the options specified, exifcom will blank the tag or set it to comment. Some digital cameras include a standard UserComment tag in the Exif data added to the image files they produce. This comment tag is fixed- length and supports multi-byte character sets (though exifcom does not). Note that not all cameras will include the tag. The utility is conservative in its approach to writing the UserComment tag. It does not modify, extend, or otherwise adulterate an image's Exif metadata structure. When writing the tag it merely changes pre-allocated bytes. Therefore, exifcom is at the mercy of the Exif data creator for both the presence of the tag and its length. It cannot create a UserComment tag when the camera does not include one, nor can it write a comment longer than the space pre-allocated by the camera. exifcom only displays and writes ASCII character set comments. OPTIONS
-b Blank the UserComment tag, overwriting both the character code and comment fields with NUL. The character code specifies how the comment is represented; it is "undefined" when blank. This is the state to which many cameras initialize the tag. When used in conjunction with the -w option, exifcom will blank the comment prior to setting it to comment. -f Overwrite or blank existing or unsupported comments without prompting for confirmation. -i Write a prompt to standard error before overwriting or blanking an existing or unsupported comment. If the response from the stan- dard input begins with 'y' or 'Y', the comment is overwritten. This option is default behavior. -n Do not overwrite or blank existing or unsupported comments and do not prompt for confirmation (i.e., automatically answer 'no' to a confirmation prompt). This option takes precedence over both the -f and -i options. -s Separate field name and value in the verbose and multiple file cases with the string delim. The default is ': '. -v Be verbose when printing the contents of the UserComment tag. Besides the comment itself (if present and supported), exifcom will display the maximum comment length supported, the character code of the comment, and the length of the comment. -w Set UserComment to the ASCII string comment. If comment is longer than what the tag supports, it will be truncated to fit. DIAGNOSTICS
The exifcom utility exits 0 on success. When displaying a comment from a single file, if the UserComment tag is missing, it exits 1; if blank, it exits 2; if in an unsupported character code, it exits 3. Otherwise, it exits 1 if an error occurs. SEE ALSO
exiftags(1), exiftime(1) STANDARDS
The exifcom utility was developed using the January 2002 Exif standard, version 2.2 (http://tsc.jeita.or.jp/). BUGS
If the tag doesn't exist or is too short, too bad. AUTHOR
The exifcom utility and this man page were written by Eric M. Johnston <emj@postal.net>. EXIFCOM(1)
All times are GMT -4. The time now is 07:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy