Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Interfacing with database.xml
bturns
Hi, Currently we have numerous Databases listed in our database.xml file. I wanted to interface with these databases using a perl script. I'm wondering if anyone knows of a way to programmatically interface with the database.xml file. Are there API's available to get DB connection values easily?
Otherwise, I was thinking I would just use an perl xml parser and grab the values that way. However, using the xml parser is going to be a lot more coding. It would be nice if there was a perl API available.
my ($host, $username, $passwd) = GetDBConnectInfo($path_to_dbxml, $db_name)
Anyone heard of this?
Thanks,
Brian
Find more posts tagged with
Comments
Rick Poulin
You might've had some luck with the OD Web Services, but there's no Perl API whatsoever in OD.
However, given your use of PERL in the first place means there's probably no drawback to just reading the XML file directly.. is there?
bturns
Yeah, no drawback to reading the xml. just figured if someone had already written a parser then I wouldn't have to. I'll just write something to parse the xml.
Thanks,
Brian