I am not sure if that is the best way of doing it. I don't like hidden form fields except where "necessary", but I think that a long string of XML in a hidden form would be a bit messy and this would require user interaction. Also it would be a pain if you wanted different XML sent at different times.
My choice would be to do the following:
1. Think of it as
requesting the XML
from the "other server" (the other way round is more complex)
2. Have a script
(or static XML file) on the "other server" that simply produces\displays the XML. Secure this with password protection if necessary.
3. Have the script on "local" server use an LWP module to request the XML from the other server. This will usually take less than 5 lines of coding =)
4. Parse the XML.
I think that this is basically what the reader has asked for. If you do it this way, then you can schedule\automate the task of grabbing the XML and parsing it very easily. I do advise to secure the XML output of the "other server" script if it contains sensitive data.
$code or die
Using perl at
The Spiders Web
Update: Besides standard LWP docs, see
use LWP::Protocol::https for some info and sample script, and also look up Net::SSLeay and Crypt::SSLeay on
CPAN
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.