Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TumorDetails>
- <personUpi>String</personUpi>
- <ageAtDiagnosis>3.14159E0</ageAtDiagnosis>
- <biopsyPathologyReportSummary>String</biopsyPathologyReportSummary>
- <primarySiteCollection>
- <tissueSite>
- <description>String1</description>
- <name>String1</name>
- </tissueSite>
- <tissueSite>
- <description>String2</description>
- <name>String2</name>
- </tissueSite>
- <tissueSite>
- <description>String3</description>
- <name>String3</name>
- </tissueSite>
- </primarySiteCollection>
- </TumorDetails>
- use strict;
- use warnings;
- use XML::Compile::Schema;
- my $node = {
- personUpi => 'String',
- ageAtDiagnosis => '3.14159E0',
- biopsyPathologyReportSummary => 'String',
- primarySiteCollection => {
- tissueSite => {
- description => 'String',
- name => 'String',
- },
- },
- };
- my $schema = XML::Compile::Schema->new('sample.xsd');
- my $writer = $schema->compile(WRITER => 'TumorDetails');
- my $doc = XML::LibXML::Document->new(q(1.0), q(UTF-8));
- print $writer->($doc, $node)->toString;
- #!/usr/bin/perl
- use strict;
- use warnings;
- use XML::Simple;
- my $tissueSite = [
- {
- description => 'String',
- name => 'String',
- },
- {
- description => 'String2',
- name => 'String2',
- },
- ];
- my $data = {
- tumorDetails => {
- personUpi => 'String',
- ageAtDiagnosis => '3.14159E0',
- biopsyPathologyReportSummary => 'String',
- primarySiteCollection => {
- tissueSite => $tissueSite,
- },
- },
- };
- print XMLout($data, KeepRoot => 1, noAttr => 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement