Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Not loading XML to HTML page

From: Tomcat User6 <SPATEL@-------.--->
To: xmlschema-dev@--.---
Date: 7/25/2008 7:51:00 AM
I have a XML page which i needs to load at HTML.

XML looks like this....

<?xml version="1.0" encoding="UTF-8"?>
<page>
=09<head>
=09=09<title><![CDATA[My Dishwasher]]></title>
=09=09<meta name="keywords" content="GenericKind=C2=AE, Fully, Integrat=
ed, Console, "
/>
=09=09<meta name="description" content="GenericKind=C2=AE cleans up all=
 the
competition." />
=09</head>
=09<body>
=09=09<h1 id="header1"><![CDATA[6 Cycle | 23 7/8 in. Width | Fully Integr=
ated
Console | Standard-Depth | Flat, Smooth Doors | Generitect=C2=AE Series II =
|
KSdishwasher1764548]]></h1>
=09=09
=09=09<p id="prodDescript"><![CDATA[This is some generic GenericKind=C2=
=AE Fully
Integrated Console Dishwasher product description copy. We are using the
product name and SKU as a search keyword to maximize search results. This
product will knock your socks off with its cleaning power. GenericKind=C2=
=AE
Generitect=C2=AE Series Fully Integrated Console Dishwasher cleans all the
competition.]]></p>
=09=09<p id="prodDescrBullets"> 
=09=09=09<ul>
=09=09=09=09<li><![CDATA[=E2=80=A2 GenericKind=C2=AE Generitect=C2=AE KSdis=
hwasher1764548 Dishwasher
Bullet Point 1]]></li>
=09=09=09=09<li><![CDATA[=E2=80=A2 GenericKind=C2=AE Generitect=C2=AE KSdis=
hwasher1764548 Dishwasher
Bullet Point 2]]></li>
=09=09=09</ul>
=09=09</p>
=09=09<p id="SKU">KSfridge1764547</p>
=09=09<p id="price">$1999.00</p>
=09=09=09=09<menu>
=09=09=09<button> data/standmixers/KSstandmixer1764549 Standmixers </button=
>
=09=09=09<button> data/refrigerators/KSfridge1764547 Refrigerators </button=
>
=09=09=09<button> data/home/GKHome.xml Home </button>
=09=09</menu>
=09=09<pageType>TIER_ONE</pageType>
=09</body>
</page>



I written a java script to write all this code into html. But don't know,
wht is happening.

I AM TOTALLY NEW TO THIS.

Here is my script...

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
var xmlhttp;

function loadXMLDoc(url)
{
xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for IE7, Firefox, Mozilla, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE5, IE6
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=onResponse;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}

function onResponse()
{
if(xmlhttp.readyState!=4) return;
if(xmlhttp.status! 0)
  {
  alert("Problem retrieving XML data");
  return;
  }
}

</script>
</head>

<body>
<div id="copy">
<button onclick="loadXMLDoc('catalog.xml')">Get  info</button>
</div>
</body>
</html>


But don't know how to get data for page,head,title,body,h1,p, header,meta
etc...

Please help me out with this.

Thank You,,



-- 
View this message in context: http://www.nabble.com/Not-loading-XML-to-HTML=
-page-tp18660178p18660178.html
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.



From mike@s... Sun Jul 27 22:34:23 2008
Received: from maggie.w3.org ([193.51.208.68])
	by frink.w3.org with esmtp (Exim 4.63)
	(envelope-from <mike@s...>)
	id


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent