Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Here's the tutorial I am using, which I have been assured is of high quality by Google: http://www.kitebird.com/articles/mysql-xml.html#TOC_5

Now, what I am trying to do is run some test scripts against some XML files, porting the data into my MySQL database tables.

Where do I type in the commands? Can I run PHP and type them in there? Do I have to install a program? Because Google doesn't recognize :: as being part of a word, so I wouldn't know where to download. Would the script run from a browser if the filename had the right extension?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

XML::Parser and XML::XPath are perl libraries

First you need to install perl.
Go to http://strawberryperl.com/ and install the latest version.

Then to install the libraries open a command prompt and type

C:\>cpan XML:Parser

That will start the installation. You will probably see a lot of text and get a few questions. You can probably choose the default answer every time (if in doubt answer yes)

Then do the same for

 C:\>cpan XML:Path

To run a perl script invoke perl with the name of the script

C:\>perl name_of_script_you_want_to_run.pl

And to answer your other questions:

  • No PHP can't run it
  • No your browser can't run it
  • To google for XML::XPath works just fine in FF, IE and chrome, but in the future try putting your string between "" if it contains funny chars.


IMPORTANT

IF YOU HAVE ANY PROBLEMS INSTALLING PERL; INSTALLING THE LIBRARIES; RUNNING THE SCRIPT FROM THE TUTORIAL

ASK NEW QUESTIONS!

Follow up questions in the comments will be ignored if they deal with these things

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.