File: xml

package info (click to toggle)
libace-perl 1.92-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,012 kB
  • sloc: perl: 7,763; ansic: 7,420; makefile: 81
file content (26 lines) | stat: -rwxr-xr-x 598 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl

# generic xml display
# should work with any data model

use strict;
use vars qw($DB);

use Ace 1.65;
use CGI 2.42 qw/:standard :html3 escape/;
use CGI::Carp qw/fatalsToBrowser/;
use Ace::Browser::AceSubs;


AceError(<<END) unless param('name') && param('class');
Call this script with URL parameters of
<VAR>name</VAR> and <VAR>class,</VAR> where
"name" and "class" correspond to the name and class of the
Ace object of interest.
END

my $obj = GetAceObject() || AceNotFound();

print header('text/plain');
print qq(<?xml version="1.0" standalone="yes"?>\n\n);
print $obj->asXML;