Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Xmllint pretty print, batch files Post 302742053 by Yoda on Monday 10th of December 2012 12:43:11 PM
Old 12-10-2012
How about a for loop with seq:
Code:
for SEQ in $( seq -f "%02g" 1 20 )
do
   xmllint --format file${SEQ}.xml > pretty_file${SEQ}.xml
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to batch & print hpgl files to xerox device

have electronic files from customer with .gl extension; are hpgl files originating from Unix. Need utility to open, batch and print in directory order on xerox docutech. Any ideas? Help greatly appreciated. (5 Replies)
Discussion started by: theresa
5 Replies

2. UNIX for Dummies Questions & Answers

Deleting a batch of print jobs

Hi Guys I have over 2000+ print jobs in one queue which I would like to delete. Is there away in AIX 4.3 that I can delete the whole print jobs at ocne. Instead of one at a time. Thanks (1 Reply)
Discussion started by: orvelb
1 Replies

3. Programming

I am pretty new to this

Ok, so I need to make a program using PICO. Here is the assignment, if anyone knows how to do this please show me. Thanks. Acme Paints, a well-respected local paint store, is having their big End-Of-Winter Paint Sale. They have way too much red, green, yellow, and blue paint on hand in their... (1 Reply)
Discussion started by: thescene
1 Replies

4. UNIX for Advanced & Expert Users

iconv and xmllint

Here is my question, volume of records processed : 5M ( approx ) Its basically very simple operation that am trying to do and I had achieved the output that am interested. What am looking for really is to improve the performance, an optimized way to do that. with respect to iconv, am... (3 Replies)
Discussion started by: matrixmadhan
3 Replies

5. Shell Programming and Scripting

xmllint output to a file

Hello All, I have an XML file which has some errors in its tag definition according to an xsd. When i validate this xml file against an xsd, i wish to only take the errors in a file and not the complete xml. for eg. Raman.xml has some errors induced in it. RamanValidator.xsd holds the schema... (5 Replies)
Discussion started by: damansingh
5 Replies

6. UNIX for Dummies Questions & Answers

Batch Renaming of Files

Hello all, thanks for your time (and this forum, what an awesome resource for newbs like myself!) Anyways, I've been given the task of importing content from a directory of about...7000 HTML files. They are all named appropriately and broken down by name depending on what book they belong too.... (8 Replies)
Discussion started by: gratefulhokie
8 Replies

7. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

8. Shell Programming and Scripting

Need to exclude .NFSxxx files in clear old files batch script

I am new to Shell Scripting and need some help. The following batch job has been failing for me due to the .nfsxxx files in use. I need to know how to modify the following script to exclude the .nfsxxx files so this batch job will not fail on me. I have done lots of googling and keep coming back... (2 Replies)
Discussion started by: kimberlyg2007
2 Replies

9. Shell Programming and Scripting

Accessing files in batch

hai, I have a list of files having extension .sy in a folder. I want to find such files and print the first two columns of the files to new extension .tmp (1 Reply)
Discussion started by: sreejithalokkan
1 Replies

10. Shell Programming and Scripting

Help with xmllint

Have like 50 xml files in a folder. They all have a Node named <Number>.How to display the values of <Number> with the count and filename in the folder. I am using Mac . (7 Replies)
Discussion started by: Anethar
7 Replies
xmllint(1)						      General Commands Manual							xmllint(1)

NAME
xmllint - command line XML tool SYNOPSIS
xmllint [--version | --debug | --shell | --debugent | --copy | --recover | --noent | --noout | --htmlout | --nowrap | --valid | --postvalid | --dtdvalid URL | --timing | --repeat | --insert | --compress | --sgml | --html | --push | --memory | --nowarning | --noblanks | --for- mat | --testIO | --encode encoding | --catalogs | --nocatalogs | --auto | --xinclude | --loaddtd | --dtdattr | --dropdtd] [xmlfile] INTRODUCTION
The xmllint program parses one or more XML files, specified on the command line as xmlfile. It prints various types of output, depending upon the options selected. It is useful for detecting errors both in XML code and in the XML parser itself. It is included in libxml2. OPTIONS
--version Display the version of libxml2 used. --debug Parse a file and output an annotated tree of the in-memory version of the document. --shell Run a navigating shell. --debugent Debug the entities defined in the document. --copy Test the internal copy implementation. --recover Output any parsable portions of an invalid document. --noent Substitute entity values for entity references. By default, xmllint leaves entity references in place. --noout Suppress output. By default, xmllint outputs the result tree. --htmlout Output results as an HTML file. This causes xmllint to output the necessary HTML tags surrounding the result tree output so the results can be displayed in a browser. --nowrap Do not output HTML doc wrapper. --valid Determine if the document is a valid instance of the included Document Type Definition (DTD). A DTD to be validated against also can be specified at the command line using the --dtdvalid option. By default, xmllint also checks to determine if the document is well- formed. --postvalid Validate after parsing is completed. --dtdvalid URL Use the DTD specified by URL for validation. --timing Output information about the time it takes xmllint to perform the various steps. --repeat Repeat 100 times, for timing or profiling. --insert Test for valid insertions. --compress Turn on gzip compression of output. --sgml Use the DocBook SGML parser. This allows documents written in SGML DocBook to be converted into an in-memory tree and treated as if they were written in XML. --html Use the HTML parser. --push Use the push mode of the parser. --memory Parse from memory. --nowarning Do not emit warnings from the parser and/or validator. --noblanks Drop ignorable blank spaces. --format Reformat and reindent the output. --testIO Test user input/output support. --encode encoding Output in the given encoding. --catalogs Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog is used by default. --nocatalogs Do not use any catalogs. --auto Generate a small document for testing purposes. --xinclude Do XInclude processing. --loaddtd Fetch external DTD. --dtdattr Fetch external DTD and populate the tree with inherited attributes. --dropdtd Remove DTD from output. AUTHORS
John Fleck <jfleck@inkstain.net>, Ziying Sherwin <sherwin@nlm.nih.gov>, Heiko Rupp <hwr@pilhuhn.de> This is release 0.2 of the xmllint Man- ual. NOTES
Source for libxml is available in the SUNWlxmlS package. Documentation for libxml is available on-line at http://www.xmlsoft.org/ 2001 Nov 26 xmllint(1)
All times are GMT -4. The time now is 06:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy