LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-10-2003, 07:30 AM   #1
amirspl
LQ Newbie
 
Registered: Sep 2003
Location: australia
Posts: 8

Rep: Reputation: 0
Reading a xml document:


Really new to linux / php ( a new newbee):
sorry but been using Microsoft products (bad boy)

here is what I used to use:
function DisplayData(){

xmldoc = new ActiveXObject("Microsoft.XMLDOM");
xmldoc.async = false;
xmldoc.load("../xml/data.xml");
if(xmldoc.parseError.errorCode != 0){
window.location.replace("../index.shtml");}
else{
nodes = xmldoc.documentElement.childNodes;
var maxl = xmldoc.documentElement.childNodes.length-1; calc.cell1.value=xmldoc.selectSingleNode("//VALUE").text;
}
}

Now this works fine on a windows based web server, question is how the hell do I get the same result on my linux web server:
Just installed Mandrake 9.1 - have web server fully operational and running! any help or pointer would be nice,

thank you
 
Old 09-10-2003, 07:44 AM   #2
Andy@DP
Member
 
Registered: Aug 2003
Location: Aberdeen, UK.
Distribution: Debian, Ubuntu
Posts: 208
Blog Entries: 2

Rep: Reputation: 30
I don't think that would work on an Apache server, I could be wrong though. Is it some ASP (possibly in JavaScript) or just JavaScript?

My advice, PHP. Learn PHP and use its XML parser. Or if you know Perl you do it with that. Hell even use JSP and do it that way!

Go get a good tutorial book covering PHP and use that. PHP is easy to pick up the basics and you'll be parsing XML in no time. Might I suggest the PHP Bible, damn good book!

Last edited by Andy@DP; 09-10-2003 at 07:48 AM.
 
Old 09-10-2003, 07:46 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,385

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well there are DOMXML extensions for mod_php: http://uk.php.net/domxml but they are still in developement, and can be changed without warning (in theory at least)
 
Old 09-10-2003, 07:51 AM   #4
Andy@DP
Member
 
Registered: Aug 2003
Location: Aberdeen, UK.
Distribution: Debian, Ubuntu
Posts: 208
Blog Entries: 2

Rep: Reputation: 30
I think that using an Apache version greater than 1.3.something gives you Expat bundled with it. Expat is an XML Parser Toolkit, homepage: http://www.jclark.com/xml/expat.html
PHP manual page: http://uk.php.net/manual/en/ref.xml.php

Last edited by Andy@DP; 09-10-2003 at 07:52 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for XML::Parser... configure: error: XML::Parser perl module is required for kornerr Linux - General 11 11-16-2008 07:24 AM
Reading OpenOffice .doc document satimis Linux - General 7 08-06-2005 09:10 AM
how do i create a document, then a directory and save the document in it. jtdodge Linux - Newbie 9 06-15-2005 11:03 AM
Convert openoffice document into ms document through cli? bruno buys Linux - Software 0 07-05-2004 09:59 AM
PHP - XML error: junk after document element at line... jimieee Programming 2 04-27-2004 11:16 AM


All times are GMT -5. The time now is 01:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration