in reply to problems with xml data being returned

First, welcome, and wrap your code in <code></code> tags.

From your description, it seems like all you needed to post was the first 7 or 8 lines of code, and I have no idea what xmlFileData() is doing, but my guess is that it's not returning what you want it to return, maybe because you're not passing what you think you're passing to it. I'd check the values of the arguments you're passing to it to make sure they are what you think they are (maybe an errant linefeed or other control character is sneaking in?) Is "getConfig()" supposed to be a string, or should it be a function call?.

  • Comment on Re: problems with xml data being returned

Replies are listed 'Best First'.
Re^2: problems with xml data being returned
by grashoper (Monk) on Jul 18, 2007 at 20:02 UTC
    XMLFileData is yet another subroutine its reading the files. I am new to perl and having trouble understanding what the code means it wouldn't be so bad but I didn't write it and its quite large and not all that modular either :( ah code tags..I thought there must be an easier way.
      I can't look any more deeply at the problem until you look closely at these two lines:
      my $xml = xmlFileData("Config",$Session->{'usrSystem'}.".config.xm +l","getConfig()"); if (!$xml)
      I have no idea what the arguments are, and even if I did know what the args were, I don't really feel like debugging the bunch of code in xmlFileData that you just posted. So, like I said before, check the arguments. If the arguments look ok, debug what's happening in xmlFileData(). Look at one thing at a time until you find out what the problem is. Try reading brian's Guide to Solving Any Perl Problem.
Re^2: problems with xml data being returned
by grashoper (Monk) on Jul 19, 2007 at 15:18 UTC
    getConfig() is a a function call.