Hi, building a database backend for a Google Map application.
Struggling along in PHP (I'm a java dude) but doing pretty good. The
code below has me confused. Both will create valid files if sent to a
file. Both display perfectly in browser when you access the script
directly. However, only the 2nd one sends readable data back to my
application. The first one generates no elements errors.
Anyone have an idea why this doesn't work:
<?php
$xmlDocument = domxml_new_doc( '1.0');
$documentElemen t = $xmlDocument->create_element ('soldiers');
$xmlDocument->append_child($ documentElement );
$god = $xmlDocument->create_element ('soldier');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('rank', 'MSG');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('name', 'Joe, G.I.');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('street', '2600 North Highlands
Avenue');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('city', 'Atlanta');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('state', 'DC');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('zip', '30101');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('lat', '34');
$god->append_child($ name);
$name = $xmlDocument->create_attribu te('lng', '-84');
$god->append_child($ name);
$documentElemen t->append_child($ god);
echo $xmlDocument->dump_mem(tru e, 'UTF-8');
?>
and this:
<?php
header("content-type:text/xml");
print '<?xml version="1.0" encoding="ISO-8859-1"?>';
print '<soldiers>';
print "<soldier rank=\"MSG\" name=\"Joe, G.I.\" street=\"2600 North
Highlands Avenue\" city=\"Atlanta\ " state=\"GA\" zip=\"30101\"
lat=\"34\" lng=\"-84\" />";
print '</soldiers>';
?>
I figured I would go with the first to have better code. But, since I
can't delay any longer had to go with the 2nd. Just curious as to why
it seems to work but doesn't!
Stacy 1 1360
Header....Heade r....Header...H *eader....Heade r...Header...He a*der!
header("content-type:text/xml"*); <-----Forgot this all important
line!
Argh. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tom Loredo |
last post by:
Hi folks-
I'm about to move from a Solaris 8/SPARC environment to a Dell running
RedHat 9. Are there any issues I need to be aware of in bringing my
Python code over (mostly scientific computation)? In particular, I know
earlier versions of RH shipped with an "old" Python installed as "python"
and that installation of more recent versions should not overwrite
"python" (e.g., install as "python2.3"). Is this still the case in RH9?
Any...
|
by: grahamd |
last post by:
Who are the appropriate people to report security problems to
in respect of a module included with the Python distribution?
I don't feel it appropriate to be reporting it on general mailing
lists.
|
by: sandy |
last post by:
Hi All,
I am a newbie to MySQL and Python. At the first place, I would like to
know what are the general performance issues (if any) of using MySQL
with Python.
By performance, I wanted to know how will the speed be, what is the
memory overhead involved, etc during database specific operations
(retrieval, update, insert, etc) when MySQL is used with Python.
|
by: malcolm |
last post by:
Hello,
We have a robust (.NET 1.1 c# winforms) client-server application that
utilizes many typed DataSets, typed DataTables and typed DataRows. Our
application is a series of windows and popup windows where you can
edit information and data, nothing out of the ordinary. I estimate we
have something like 50 to 100 tables and/or views in our database each
of which map to one strongly typed DataTable. Now we have some odd 20
to 30 typed...
|
by: Aliandro |
last post by:
Hi Does any one know where I can find information regarding any issues with
SQL and IIS being run under windows XP SP2? as I am in the process of
programmning in Dot net and neet some way of knowing if there are any issues
before I start. So if some one can please inform me of a place that has this
information that would be greatly appreciated.
Thanks
Ali
| |
by: David Laub |
last post by:
I have stumbled across various Netscape issues, none of which appear to be
solvable by tweaking the clientTarget or targetSchema properties. At this
point, I'm not even interested in "solving" these problems - I'm more
interested in isolating them, .i.e. finding a "complete" list of issues.
Here's my list of serious issues found so far. By serious, I mean
functionality that fails, as opposed to much less serious (albeit annoying)
display...
|
by: G2 |
last post by:
Hi
We are dealing with significant browser compatibility issues with Netscape 5.x+ browsers and Mac IE. I am sure most web developers have faced similar issues in the past. Can anyone give me their thoughts on how they were able to address these issues ? Are there any best practices published by MS on how to ensure browser compatibility when coding asp.net
Thanks for any input.
|
by: GaryDean |
last post by:
We have been developing all of our .net applications on 32 bit windows using
32 bit SQL Server. We are being asked to now deploy to servers running
64bit windows and 64bit SQL Server. Are there issues? Differences? Should
we switch our dev environment to 64bit.
What is the advantage of going with 64 bit servers other than being able to
address more memory?
Thanks,
Gary
|
by: eschneider |
last post by:
Just some common issues with WS:
Using custom objects: When objects change, seems you are always fixing some
issue. Update references, which sometimes does not work.
Deployment:
Weird errors which take a while to fix because the error stink:
Forget to set ASP.NET 2.0="Parser Error Message: Could not load
type"
'*.Global' is ambiguous: it could come from assembly=I deleted the
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |