For How to make an XML Request in Perl -help required? [closed]

Rayham

New Member
Being new to Perl and XML..Can any one guide me in order to do the following:I have to write a Perl Code which should do :[*]Make a connection.[*]Get the reponse of the connection which is connectionId and store that if in a variable.[*]Close connectionInput :XML Request should be posted.The request type is http.The Syntax of XML I am having along with me.Can any one guide me what steps I should follow to meet above requirement.Thanks in advanceAdding the Code:\[code\]use LWP::UserAgent;use HTTP::Request::Common;# The xml_requestmy $xml_req = "<?xml version=1.0 encoding UTF-8?> <!ELEMENT drl (openconnection)> <!ATTLIST drl mode normal connectionid null > <!ELEMENT openconnection EMPTY> <!ATTLIST openconnection username admin password admin ></drl>";my $ua = LWP::UserAgent->new();my $response = $ua->post("http://XX.X.X.X:XXXX/lab/v1_2/connection/openConnectionRequest.dtd", Content => $xml_req);\[/code\]The output is a hash but if it should return and id which is a no..where I am going wrong?
 
Back
Top