473,394 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

DBI and xml:parser

i have created a script that uses the DBI and the XML::Parser modules.
i have created a connection in the main scope and then i create & execute a
statment in one of the start_handler of the xml::parser, along the lines of

$dbh = DBI->connect("my connection");
$xp = new XML:Parser(HANDLERS =>{Start => \&myStartSub}

sub myStartSub {
# creates sql statment
$dbh->do("the sql statment")
}

the problem i'm having is that the sql statment is not executing, it doesn't
return any errors.
if i move the $dbh->do("the sql statment") out of the sub it works fine, but
that's not much good to me up there, it also works if i place $dbh =
DBI->connect("my connection"); inside the sub, but i don't want to be
creating a db connection evertime i parse an element.
How do i get around this?
Mark
Jul 19 '05 #1
0 1548

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Paulo Pinto | last post by:
Hi, does anyone know of a Python package that is able to load XML like the XML::Simple Perl package does? For those that don't know it, this package maps the XML file to a dictionary.
6
by: Don HO | last post by:
Hi, I'm developing a project in C++ under MS Windows (without MFC). I want to use an xml file as the configuration file of the program. The problem is : after downloading xerces, I realized...
2
by: Magnus Heino | last post by:
Hi. Are there any patterns or other design techniques that could be used when implementing a xml parser that needs to be able to handle different versions of a schema? Let's say that I write...
16
by: Mike | last post by:
Does anyone know of a minimal/mini/tiny/small xml parser in c? I'm looking for something small that accepts a stream or string, builds a c structure, and then returns an opaque pointer to that...
2
by: friend.05 | last post by:
I have never used xml. how can I run XML parser? I am having to file *.xml amd *.phps (xml parser). But how should I run this files. Do I need any software or not. By using xml parser I...
8
by: Elmar Brandt | last post by:
Hello, we are looking for a fast XML parser. The XML-files are very big (>2GB) and we want to convert them into other formats via XSLT. Has anyone an idea? With best regards Elmar Brandt
1
by: onewaylife | last post by:
Hi all I am novice in XML. I have just started to creating PHP parser for XML files. I am using SAX. the file is : - <html> <head> <basefont face="Arial"> </head> <body> <?php
2
by: Alex | last post by:
Hello all, As I don't have any experience with XML parsers, I'm looking for your advice in this group. In the project I'm involved with, we are dealing with parsing of XML messages that are...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
3
by: Eric Kaplan | last post by:
anyone used the PUG XML parser? http://trac.zeitherrschaft.org/zzub/browser/trunk/src/plugins/lunar/pugxml.h?rev=1561 Is it an easy XML parser to use? any tutorial / sample code on how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.