Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cgi::xml(3pm) [debian man page]

XML(3pm)						User Contributed Perl Documentation						  XML(3pm)

CGI::XML - Perl extension for converting variables to/from XML SYNOPSIS
use CGI::XML; $q = new CGI::XML; # convert variables to XML $xml = $q->toXML; $xml = $q->toXML($root); # convert XML to variables $q->toCGI($xml); DESCRIPTION
The CGI::XML module converts variables to XML and vice versa. CGI::XML is a subclass of, so it reads the CGI variables just as would. METHODS
$q = new CGI::XML creates a new instance of CGI::XML. You also have access to all of the methods in $q->toXML([$root]) where $root is an optional parameter that specifies the root element. By default, toXML will not return a root element. $q->toCGI($xml) where $xml is the XML you would like to convert to parameters. Values in the XML will overwrite any existing values if they exist. NOTE
CGI::XML does not currently handle multiple selections passed from HTML forms. This will be added in a future release. AUTHOR
Jonathan Eisenzopf <> CONTRIBUTORS
David Black <> SEE ALSO
perl(1), XML::Parser(3). perl v5.8.8 2004-12-05 XML(3pm)

Check Out this Related Man Page

Dumper(3)						User Contributed Perl Documentation						 Dumper(3)

XML::Dumper - Perl module for dumping Perl objects from/to XML SYNOPSIS
# Convert Perl code to XML use XML::Dumper; my $dump = new XML::Dumper; $data = [ { first => 'Jonathan', last => 'Eisenzopf', email => '' }, { first => 'Larry', last => 'Wall', email => '' } ]; $xml = $dump->pl2xml($perl); # Convert XML to Perl code use XML::Dumper; my $dump = new XML::Dumper; # some XML my $xml = <<XML; <perldata> <scalar>foo</scalar> </perldata> XML # load Perl data structure from dumped XML $data = $dump->xml2pl($Tree); DESCRIPTION
XML::Dumper dumps Perl data to a structured XML format. XML::Dumper can also read XML data that was previously dumped by the module and convert it back to Perl. This is done via the following 2 methods: XML::Dumper::pl2xml XML::Dumper::xml2pl AUTHOR
Jonathan Eisenzopf <> CREDITS
Chris Thorman <> L.M.Orchard <> DeWitt Clinton <> SEE ALSO
perl(1), XML::Parser(3). perl v5.8.0 1999-06-20 Dumper(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checkbox_group => CGI, Perl

Hi, In my cgi script(written in Perl using i have a checkbox and i want all the items to be checked. Here is what i use: checkbox_group(-name=>'studenten_in_groep', -values=>\@member_keys, -defaults=>\@member_keys, -labels=>\%temp_members, -columns=>2), But no boxes are checked...... (18 Replies)
Discussion started by: tine
18 Replies

2. Linux

XML in unix

Can you please tell for some freeware unix based command line XML parser/tool which will check whether a particular XML corresponds to its XSD or not. please help immediately......... (15 Replies)
Discussion started by: infyanurag
15 Replies

3. Shell Programming and Scripting

How can I parse xml file?

How can I parse file containing xml ? I am sure that its best to use perl - but my perl is not very good - can someone help? Example below contents of file containing the xml - I basically want to parse the file and have each field contained in a variable.. ie. I want to store the account... (14 Replies)
Discussion started by: frustrated1
14 Replies

4. Shell Programming and Scripting

Can't get my head wrapped around CGI/Perl

Hello, I am about 3 weeks new to CGI/ Perl scripting and so far some concepts I can wrap my head around perfectly but others not so much. I was wondering if I could get some help in making a script that will pull from a text file and put back into a form. I can make a script that takes input... (15 Replies)
Discussion started by: sennex
15 Replies

5. Shell Programming and Scripting

Using AWK to separate data from a large XML file into multiple files

I have a 500 MB XML file from a FileMaker database export, it's formatted horribly (no line breaks at all). The node structure is basically <FMPXMLRESULT> <METADATA> <FIELD att="............." id="..."/> </METADATA> <RESULTSET FOUND="1763457"> <ROW att="....." etc="...."> ... (16 Replies)
Discussion started by: JRy
16 Replies

6. UNIX for Dummies Questions & Answers

Extracting data from an xml file

Hello, Please can someone assist. I have the following xml file: <?xml version="1.0" encoding="utf-8" ?> - <PUTTRIGGER xmlns:xsd="" xmlns:xsi="" APPLICATIONNUMBER="0501160" ACCOUNTNAME="Mrs S Test"... (15 Replies)
Discussion started by: Dolph
15 Replies

7. Shell Programming and Scripting

Using SED/AWK to extract xml at end of file

Hello everyone, Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part. What i need to do is, prompt the user for a file to work with, which i have done. promt the user for an output file - which is done. #!/bin/bash... (14 Replies)
Discussion started by: hugh86
14 Replies

8. Shell Programming and Scripting

Execution problem unix commands in Perl CGI

I am trying to run SSH , mkdir and other unix commands using Perl CGI. But i am not able to Execute these commands. Please help me out !!!! SSH and mkdir is necessity for me. I will be thankful to you...!!!!! I am trying like: In perl CGI file i am writing like: @list = `ssh... (28 Replies)
Discussion started by: Navrattan Bansa
28 Replies

9. Shell Programming and Scripting

Extract TAG name and XPATH from XML file via shellscript

Hi, Here is a sample xml file and expected output. I need to extract the element/tag name (not value) and xpath (sample output.txt). But the main problem is I put here one simple xml file where I can clearly see the number of elements, but in real time I have a xml file which have over 500... (18 Replies)
Discussion started by: BithunC
18 Replies

10. UNIX for Advanced & Expert Users

XML parsing by UNIX

Hi, I am new in shell scripting. i want to extract tag values in xml files by using shell script. my files like this: <cw: properties> <cw:std_properties> <tns: properties> <tns:name>AdminOutQueue</tns:name> <tns:type>String</tns:type> <tns:subtype>QueueName</tns:subtype> <tns:value... (25 Replies)
Discussion started by: arindam guha
25 Replies

11. Shell Programming and Scripting

How can I remove some xml tag lines using shell script?

Hi All, My name is Prathyu and I am working as a ETL develper. I have one requirement to create a XML file based on the provided XSD file. As per the Datastage standards Key(repeatable) field does not contain any Null values so I am inserting some dummy tag line to that XML file. ... (14 Replies)
Discussion started by: Prathyu
14 Replies

12. Shell Programming and Scripting

Parsing XML using command line

Hi Experts, How do I parse a XML with below contents <saw:user name="" /> <saw:user name="" /> <saw:user name="" /> and retrieve below output ? ... (17 Replies)
Discussion started by: pauldx
17 Replies

13. Shell Programming and Scripting

UNIX/PERL script to convert XML file to pipe delimited format

Hello, I need to get few values from a XML file and output needs to be written in another file with pipe delimited format. The Header & Footer of the Pipe Delimited file will be constant. The below is my sample XML file. I need to pull the values in between the XML tags <Operator_info to... (15 Replies)
Discussion started by: karthi1305561
15 Replies

14. Shell Programming and Scripting

How can I extract XML block around matching search string?

I want to extract XML block surrounding search string Ex: print XML block for string "myapp1-ear" surrounded by "<application> .. </application>" Input XML: <?xml version="1.0" encoding="UTF-8"?> <deployment-request> <requestor> <first-name>kchinnam</first-name> ... (16 Replies)
Discussion started by: kchinnam
16 Replies

15. Shell Programming and Scripting

Splitting CSV into variables then to XML file

I have a text file that looks like this: FIELD1, FIELD2, THIS IS FIELD3, FIELD4 FIELD1, FIELD2, THIS IS FIELD3, FIELD4 FIELD1, FIELD2, THIS IS FIELD3, FIELD4 I need it to turn it into an XML file to run against a custom application. My ultimate goal is for it to look like... (15 Replies)
Discussion started by: jeffs42885
15 Replies

Featured Tech Videos