Re: [Http-webtest-general] Question about XMLParser
Brought to you by:
m_ilya,
richardanderson
From: Johannes la P. <joe...@us...> - 2005-02-03 19:25:39
|
Op 3-feb-05 om 16:01 heeft Bob Koertge het volgende geschreven: > I have a question maybe someone could help me with.=A0 > > I am using XMLParser in perl.=A0 What I would like to know is, is = there=20 > a way to specify a variable in the xml file that perl will expand. > > ie > =A0=A0=A0 <test> > =A0=A0=A0=A0=A0=A0=A0 <param name=3D"min_bytes">$min_bytes</param> > =A0=A0=A0 </test> Bob, The following should work: =A0=A0=A0 <test> =A0=A0=A0=A0=A0=A0=A0 <code name=3D"min_bytes">return = $min_bytes</code> =A0=A0=A0 </test> This works because of the contents of a "code" element result in an=20 (anonmymous) subroutine, rather than a scalar value for a plain "param"=20= element. (You should define the variable $min_bytes somewhere else in your=20 script). Hope this helps, otherwise please let me know! Cheers, Joe.= |