Hacking Google Maps and Google Earth (ExtremeTech)
Chapter 5 — Storing and Sharing Information 75 You can see the resulting XML generated from this file in Listing 5-10. Listing 5 ...
76 Part I — Basics Listing 5-11 (continued) ‘China Inn’ => {longitude => -0.6391666, latitude => 52.911111}, }; foreach ...
Chapter 5 — Storing and Sharing Information 77 Parsing XML with Perl You can deal with XML data within Perl in many ways. There ...
78 Part I — Basics Using this structure you can extract a list of restaurants by obtaining a list of the top-level tags with the ...
Chapter 5 — Storing and Sharing Information 79 First, parse the supplied file into an XML object my $doc = $parser->parsefile ...
80 Part I — Basics contain an interface to the DOM system. You may be familiar with the DOM interface, because the DOM enables y ...
Chapter 5 — Storing and Sharing Information 81 Listing 5-18: Processing XML in JavaScript var request = GXmlHttp.create(); reque ...
82 Part I — Basics Aside from the additional steps required to add the points to the map and the more complex process of loading ...
Chapter 5 — Storing and Sharing Information 83 Creating a Database Structure Using a professional RDBMS for storage means that s ...
84 Part I — Basics Listing 5-19: Creating a SQL Table create table restaurants (id int auto_increment not null primary key, lng ...
Chapter 5 — Storing and Sharing Information 85 Connecting to a Database Using DBI and Perl The DBI module in Perl provides acces ...
86 Part I — Basics The object created in the example,$dbh, now becomes the method for communicating with the MySQL database. For ...
Chapter 5 — Storing and Sharing Information 87 With PDO, you create a new object that provides connectivity to the RDBMS you are ...
88 Part I — Basics Listing 5-24: Inserting Data with Perl #!/usr/bin/perl use DBI; my $dbh = DBI- >connect(“DBI:mysql:databas ...
Chapter 5 — Storing and Sharing Information 89 Listing 5-26: Inserting Data with PHP (PDO) <?php try { $dbh = new PDO(‘mysql: ...
90 Part I — Basics Listing 5-27 (continued) print “Connected to database\n”; } else { print “Couldn’t connect\n”; } my $sth = $d ...
Chapter 5 — Storing and Sharing Information 91 Listing 5-29: Generating XML from Your SQL Database !/usr/bin/perl use DBI; use X ...
92 Part I — Basics Similar results can be achieved with PHP. In a real-world situation, the script would work as a CGI script an ...
Instant Gratification Chapter 6 Working with Existing Address Information Chapter 7 Extending the Google API Examples Chapter 8 ...
10_790095 pt02.qxp 6/12/06 1:34 PM Page 94 ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf