getconfig() is a function.. I am including xmlfiledata in case it helps..I really need help to solve this one
<blockquote> sub xmlFileData { use OLE; my ($path, $file, $caller) = @_; my $sPath = $path; $sPath =~ s/\///g; my $xml = ""; my $xmlFSO = CreateObject OLE "Scripting.FileSystemObject"; if ($Application->{"cxml_".$sPath.$file} && ($Application->{"cxml_ +".$sPath.$file."_dlm"} - time) > (5 * 60 * 60) && !$Session->{'forceF +iles'}) { #refreshed < n minutes ago, consider fresh } else { my $Conn = CreateObject OLE "ADODB.Connection"; my $RS = $Server->CreateObject("ADODB.Recordset"); $Conn->Open("PROVIDER=SQLOLEDB;DATA SOURCE=$Session->{'sqlServer +'};UID=$Session->{'sqlUser'};PWD=$Session->{'sqlPass'};DATABASE=$Sess +ion->{'dbName'}"); if ($Conn) { #CONN OK if ($Session->{'forceFiles'} && $Application->{"cxmlF_".$sPath +.$file."_dlm"}) { if ($Application->{"cxmlF_".$sPath.$file."_dlm"} ne $xmlFSO- +>GetFile($Server->MapPath("$path/$file"))->{'DateLastModified'}) { my $sql = "UPDATE XMLFileData SET Active='0' WHERE Path='$path' AND FileName='$file';"; $RS = $Conn->Execute($sql); } } if ($Session->{'cacheData'}) { my $sqlDLM = ""; my $sqlBody = ""; my $dumpFile = 0; my $setSQL = 0; my $sql = "SELECT LastModify, Body FROM XMLFileData WHERE Active='1' AND Path='$path' AND FileName='$file';"; if ($Session->{'trackDB'}){lg("DB","xmlFileData($sql)");} $RS = $Conn->Execute($sql); if ($RS) { if (!$RS->EOF()) { $sqlDLM = $RS->Fields('LastModify')->{Value}; $sqlBody = $RS->Fields('Body')->{Value}; $RS->Close; } } if ($sqlDLM) { if ($sqlDLM eq $Application->{"cxml_".$sPath.$file."_dlm"} +) { #SQL_dlm=App_dlm USE APP $xml = "<app/>"; } else { #SQL_dlm!=App_dlm USE SQL SET APP DUMP FILE $xml = "<sql/>"; $Application->Lock(); $Application->{"cxml_".$sPath.$file."_dlm"} = $sqlDLM; $Application->{"cxml_".$sPath.$file} = $sqlBody; + $Application->Unlock(); $dumpFile++; } } else { if ($Application->{"cxml_".$sPath.$file} && !($Session->{' +forceFiles'} && $xmlFSO->GetFile($Server->MapPath("$path/$file"))->{' +DateLastModified'} ne $Application->{"cxmlF_".$sPath.$file."_dlm"})) { #SQL=N App=Y USE APP SET SQL $setSQL++; } else { #SQL=N App=N if ($xmlFSO->FileExists($Server->MapPath("$path/$file")) +) { $xml = "<file/>"; #SQL=N App=N File=Y USE File SET SQL SET APP $Application->Lock(); my $xmlHandle = $xmlFSO->OpenTextFile($Server->MapPath +("$path/$file"),1); $Application->{"cxml_".$sPath.$file} = $xmlHandle->Rea +dAll(); $Application->{"cxml_".$sPath.$file."_dlm"} = $Applica +tion->{"cxmlF_".$sPath.$file."_dlm"} = $xmlFSO->GetFile($Server->MapP +ath("$path/$file"))->{'DateLastModified'}; $Application->Unlock(); $xmlHandle->Close(); $setSQL++; } else { #SQL=N App=N File=N Hope for the Best and Some better error reporting } } } if ($dumpFile) { #uncomment this stuff when ability to modify is on. my $fFSO = CreateObject OLE "Scripting.FileSystemObject"; my $fHandle = $fFSO->OpenTextFile($Server->MapPath("$path/ +$file"), 2, True); $fHandle->WriteLine($Application->{"cxml_".$sPath.$file}); $fHandle->Close(); $fHandle = undef; $fFSO = undef; } if ($setSQL) { my $sql = "INSERT INTO XMLFileData (Active, LastModify, Path, FileName, Body) VALUES ('1', {fn NOW()}, '$path', '$file', '".$Appli +cation->{"cxml_".$sPath.$file}."')"; if ($Session->{'trackDB'}){lg("DB","xmlFileData($sql)");} $RS = $Conn->Execute($sql); } $xml = $Application->{"cxml_".$sPath.$file}; } else { #No Cache,. don't be retarded,. turn it back on. } } else { #CONN BAD } } return $xml; }

In reply to Re: problems with xml data being returned by grashoper
in thread problems with xml data being returned by grashoper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.