Help: getting data from an external xml file

M

Mauro Improta

Hi,

I am a first-time XML programmer. I have to get a value from an external
well-done xml file, that starts with a tag

<FIELD1>

and ends with

</FIELD1>

with no other declarations. I don't manage to reach the datas!!!
I can't use SYSTEM in the dtd declaration part, because this file is not
a dtd, so I choosed to include it with php, but it doesn't work. I have
created a dtd for all the fields of this data file, and put a xsl file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tabledoc SYSTEM "dtdfile.dtd">
<?xml-stylesheet type="text/css" href="xslfile.xsl"?>
<?php
include ("datafile.xml");
?>

and the xslfile is this:

<?xml version="1.0"?>
<xsl:mytable xmlns:xsl="uri:xsl">
<HTML>
<BODY>
<DIV>
<SPAN STYLE="font-weight:bold; font-size:20">
<xsl:get-value for="PARENT/CHILD"/>
</SPAN>
</DIV>
</BODY>
</HTML>
</xsl:mytable>

and the result is: a first level element is need.
Please help me.
Thanks to everybody
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top