Sponsored Content
Top Forums Shell Programming and Scripting How to convert a txt file to xml file Post 302346876 by fpmurphy on Monday 24th of August 2009 10:02:08 AM
Old 08-24-2009
I would also recommend placing the text inside a CDATA section to guard against illegal XML characters.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Plz Help To convert xml file to text file using bourn shell scripts

If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts. My xml file: <root> <header_rec recordtype="00"> <record_id>00</record_id> <country_code>AK></country_code>... (0 Replies)
Discussion started by: ram2s2001
0 Replies

2. Shell Programming and Scripting

Convert XML file into TEXT file using PERL seript

Dear Yogesh..."Convert XML file into TEXT file using PERL seript"... can u help me regarding this issue...plz Thanks Rudro (0 Replies)
Discussion started by: Rudro
0 Replies

3. Shell Programming and Scripting

convert a txt file to xls file

How to convert a txt file(tab delimiter) to xls file. Looking forward help. Thanks, Venkatesh. (2 Replies)
Discussion started by: venkatesht
2 Replies

4. UNIX for Dummies Questions & Answers

To convert a txt file to .xls file

i want to convert a comma seprated file into a .xls file the file contains 3 fields seprated by a comma. i want to convert it into a .xls file with 3 columns and 37 rows DPRPT400,01/15/2009-15:03:06,01/15/2009-15:03:08 DPRPT401,01/15/2009-15:03:15,01/15/2009-15:03:32... (11 Replies)
Discussion started by: manit
11 Replies

5. Shell Programming and Scripting

PERL:How to convert numeric values txt file to PACKED DECIMAL File?

Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL. Regards, Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies

6. Shell Programming and Scripting

How to convert a .log file into .txt file under unix??

Hi Friends, I have a .log file generated from a tool(Windows PC) which can be opened using a notepad, but when I tried to view the file in unix (cygwin on my laptop) the file type is showing as binary file, So I am unable to process the file. I need to extract some of the selected text... (3 Replies)
Discussion started by: ks_reddy
3 Replies

7. Shell Programming and Scripting

Replace the .txt file between two strings in XML file

Hi i am having XML file with many number of lines,I need to replace between two strings with .txt file using awk. For ex <PersonInfoShipTo ------------------------------ /> My requirement is to replace the content between <PersonInfoShipTo ------------------------------ /> help me. Thanks... (9 Replies)
Discussion started by: Padmanabhan
9 Replies

8. UNIX for Dummies Questions & Answers

Cannot convert this .pages file to a .txt file?!?

I'm trying to use the textutil feature in terminal to convert this .pages file to a .txt file. I've succeeded converting other files like .doc or .docx over to a .txt but this one in particular is giving me headache. I changed the permission rights to 755 but I don't think that mattered to begin... (1 Reply)
Discussion started by: syregnar86
1 Replies

9. UNIX for Advanced & Expert Users

Convert CSV file to nested XML file using UNIX/PERL?

we have a CSV which i need to convert to XML using Perl or Unix shell scripting. I was able to build this XML in oracle database. However, SQL/XML query is running for long time. Hence, I'm considering to write a Perl or shell script to generate this XML file. Basically need to build this XML... (3 Replies)
Discussion started by: laknar
3 Replies

10. UNIX for Beginners Questions & Answers

Convert a txt file to a CSV file

Hi , I have a Txt file which consist of 1000's of SOAP request and response and i want the file to be converted to a csv file like column a should have a soap request and column b should have the soap response . can someone assist me in achieving this please ? Thanks (2 Replies)
Discussion started by: kumarm8
2 Replies
SGML2XML(1)															       SGML2XML(1)

NAME
sgml2xml - convert SGML to XML An SGML System Conforming to International Standard ISO 8879 -- Standard Generalized Markup Language SYNOPSIS
sgml2xml [ -Cehilprvx ] [ -bencoding ] [ -ccatalog ] [ -Ddir ] [ -ffile ] [ -iname ] [ -wwarning ] [ -xxml-output-option ] sysid... DESCRIPTION
sgml2xml converts SGML to XML. sgml2xml parses and validates the SGML document contained in sysid... and writes an equivalent XML document to the standard output. sgml2xml will warn about SGML constructs which have no XML equivalent. OPTIONS
-bencoding Use encoding for output. The default is UTF-8. See nsgmls(1) for the possible encoding types. -ccatalog Use the catalog entry file file. -C The filename... arguments specify catalog files rather than the document entity. The document entity is specified by the first DOCU- MENT entry in the catalog files. -Ddirectory Search directory for files specified in system identifiers. Multiple -D options are allowed. See nsgmls(1) for more information about this option. -e Describe open entities in error messages. -ffile Redirect errors to file. This is useful only for shells that do not support redirection of stderr. -iname Pretend that <!ENTITY % name "INCLUDE"> occurs at the start of the document type declaration subset in the SGML document entity. Since repeated definitions of an entity are ignored, this definition will take precedence over any other definitions of this entity in the document type declaration. Multiple -i options are allowed. If the SGML declaration replaces the reserved name INCLUDE then the new reserved name will be the replacement text of the entity. Typically the document type declaration will contain <!ENTITY % name "IGNORE"> and will use %name; in the status keyword specification of a marked section declaration. In this case the effect of the option will be to cause the marked section not to be ignored. -v Print the version number. -wtype Control warnings and errors according to type. See nsgmls(1) for the allowed values of type. -xxml-output-option Control the XML output, according to the value of xml_output_option as follows: no-nl-in-tag Don't use newlines inside start-tags. Usually sgml2xml uses newlines inside start-tags so as to reduce the probability of excessively long lines. id Output attribute declarations for ID attributes. notation Output declarations for notations. ndata Output declarations for external data entities. XML requires these to be NDATA. sgml2xml will warn about CDATA and SDATA external data entities and output them as NDATA entities. cdata Use XML CDATA sections for CDATA marked sections and for elements with a declared content of CDATA. comment Output comment declarations. Comment declarations in the DTD will not be output. lower Prefer lower case. Names that were subjected to upper-case substitution by SGML will be folded to lower case. This does not include reserved names; XML requires these to be in upper-case. pi-escape Escape &<> in the contents of processing instructions using the amp, lt and gt entities. This allows processing instructions to contain the string >?, but requires that applications handle the escapes. empty Use the <e/> syntax for element types e declared as EMPTY. attlist Output a ATTLIST declaration for every element specifying the type of all attributes. The default will always be #IMPLIED. Multiple -x options are allowed. AUTHOR
James Clark <jjc@jclark.com> Conversion to DocBook and man page from original HTML documention by Steve Cheng <steve@ggi-project.org>. SEE ALSO
nsgmls(1) /usr/share/doc/sp/sx.htm SP
05 July 1999 SGML2XML(1)
All times are GMT -4. The time now is 04:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy