in reply to Re^2: Writing XML file according to schema with extracted text from string length
in thread Writing XML file according to schema with extracted text from string length

And the code and data you have written are cleverly hidden ... where?

HTH,

planetscape
  • Comment on Re^3: Writing XML file according to schema with extracted text from string length

Replies are listed 'Best First'.
Re^4: Writing XML file according to schema with extracted text from string length
by VikashParijat (Initiate) on Jan 09, 2009 at 11:57 UTC
    Hi,

    Here is my code.

    use XML::Compile::Schema;

    use XML::LibXML;

    my $doc = XML::LibXML::Document->new('1.0', 'UTF-8');

    my $schema = XML::Compile::Schema->new('Example.xsd', ignore_unused_tags => 0);

    my $write = $schema->compile(WRITER => "RootTag");

    my $xml = $write->($doc, $hash);

    my $result = $doc->setDocumentElement($xml);

    Kindly help me..

    Thanks.