GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STAG-FLATTEN.PL (1)

.ds Aq ’

NAME

stag-flatten - turns stag data into a flat table

CONTENTS

SYNOPSIS



  stag-flatten -c name -c person/name dept MyFile.xml



DESCRIPTION

reads in a file in a stag format, and ’flattens’ it to a tab-delimited table format. given this data:



  (company
   (dept
    (name "special-operations")
    (person
     (name "james-bond"))
    (person
     (name "fred"))))



the above command will return a two column table



  special-operations      james-bond
  special-operations      fred



If there are multiple values for the columns within the node, then the cartesian product will be calculated

USAGE



  stag-flatten [-p PARSER] [-c COLS] [-c COLS] NODE <file>



ARGUMENTS

-p|parser FORMAT FORMAT is one of xml, sxpr or itext

xml assumed as default

-c|column COL1,COL2,COL3,.. the name of the columns/elements to write out

this can be specified either with multiple -c arguments, or with a comma-seperated (no spaces) list of column (terminal node) names after a single -c

-n|nest if set, then the output will be a compress repeating values into the same row; each cell in the table will be enclosed by {}, and will contain a comma-delimited set of values

SEE ALSO

Data::Stag
Search for    or go to Top of page |  Section 1 |  Main Index


perl v5.20.3 STAG-FLATTEN (1) 2009-12-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.