Visit Our Home Page
 Explored,Designed,Delivered.sm
Welcome, Guest. Please Login or Register (Password Reminder)


Creativyst Forums 
Support & Discussion 
Register Help Search Login  
   
   Creativyst Forums-TOP
   Web Site Design
   displaying xml within html
(Moderator: admin)
 Author
Topic: displaying xml within html       [Link=167]
Reply Please log in first.
xentelian
New Member


Posts: 7




     
    displaying xml within html   (Date posted: 07/05/06 at 18:22:02) Quote Modify Delete

as per example 1 in

http://www.creativyst.com/Doc/Articles/XMLhtmlT/XMLhtmlT.htm

the only line in my .htm document that differs is

<XML ID="MyProducts" SRC="http://www.creativyst.com/Doc/Articles/XMLhtmlT/Products.xml"></XML>

completely disappears after I save it, so it has no way to reference the xml file and I do not know why.

   E-Mail   Ip: Logged
xentelian
New Member


Posts: 7




     
    Re: displaying xml within html   (Date posted: 07/05/06 at 18:27:42) Quote Modify Delete

I used internet explorer 6.
Is there some other requirement I missed?
The only thing I changed was source "Products.xml" to the one on your site "http://www.creativyst.com/Doc/Articles/XMLhtmlT/Products.xml" as I do not have it locally on my drive where I launched the .htm

That xml source line keeps disappearing from the code after saved though even though it is replica of the one on your site.

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: displaying xml within html   (Date posted: 07/05/06 at 23:39:11) Quote Modify Delete

xentelian,

I'm sorry, I don't understand what you mean by:

"completely disappears after I save it, so it has no way to reference the xml file and I do not know why"

Do you mean when you save the HTML file to your disk drive after you edit it?

-djr

   E-Mail   Ip: Logged
xentelian
New Member


Posts: 7




     
    Re: displaying xml within html   (Date posted: 07/06/06 at 11:08:34) Quote Modify Delete

<XML ID="MyProducts" SRC="http://www.creativyst.com/Doc/Articles/XMLhtmlT/Products.xml"></XML>

This exact line disappears from the products.htm file after I save it. Everything else stays the same. If I run it, it won't display the info from products.xml because the reference is lost.

   E-Mail   Ip: Logged
xentelian
New Member


Posts: 7




     
    Re: displaying xml within html   (Date posted: 07/06/06 at 11:13:49) Quote Modify Delete

Basically, if I take the htm and xml file from example 1 on your site, I cannot get them to work. The reason is because when I save the htm file, the xml line in htm file that references which xml file disappears after I save it for some strange reason.

   E-Mail   Ip: Logged
xentelian
New Member


Posts: 7




     
    Re: displaying xml within html   (Date posted: 07/06/06 at 11:21:23) Quote Modify Delete

I know what problem is.
I edited file with MS word and then view source to edit the actual html code.
For some reason, the xml reference disappears there.
If I edit the html file with wordpad instead,
I have no problem.
Sorry about that.

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: displaying xml within html   (Date posted: 07/06/06 at 11:48:09) Quote Modify Delete

xentelian,

No problem. It may help someone else now.

One thing I would like to suggest is that you find a good TEXT editor for doing this stuff. Wordpad isn't quite as bad as Word, but it will still try to "help" you by automatically changing things in the text of your files (you can't edit a Perl script in wordpad for example).

Notepad works but only for small files. There are other editors that you can download out on the web that are low-cost or even free.

The key is to find a good "TEXT editor". These may also be referred to as "programmer's editors". Such editors will not add or take away anything from your text when you save the file.

-djr

   E-Mail   Ip: Logged
xentelian
New Member


Posts: 7




     
    Re: displaying xml within html   (Date posted: 07/07/06 at 13:38:34) Quote Modify Delete

Now I have a different issue.
This works perfectly with IE6 from my local pc, but not from a couple of web servers I upload on.
It shows the table, but not the values there.
Does it not work on apache web server?

<HTML>

<BODY>

<!-- This is the 'Data Island' element -->
<XML ID="ESO2" SRC="http://www.agecommunity.com/query/esocounts.xml"></XML>

<!-- Note the DATASRC attribute naming the MyProducts island -->
<TABLE bgcolor=tan ID="ProdTable" DATASRC="#ESO2" BORDER="1">
<TD>
<B>ESO2 Population:</B> <SPAN DATAFLD="online"></SPAN><BR>
</TD>
<TABLE bgcolor=tan DATAFLD="games" DATASRC="#ESO2" BORDER="1">
<TH>
Active Games
</TH>
<TH>
Custom Games
</TH>
<TH>
Quicksearch Games
</TH>

<TR>

<TD>
<SPAN DATAFLD="active" ></SPAN>
</TD>
<TD>
<SPAN DATAFLD="listed"></SPAN>
</TD>
<TD>
<SPAN DATAFLD="quicksearch"></SPAN>
</TD>
</TR>
</TR>
</TABLE>
</TABLE>

</BODY>
</HTML>

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: displaying xml within html   (Date posted: 07/07/06 at 15:10:47) Quote Modify Delete

Apache isn't the problem (this is all done on the client side).

I'm not sure what the problem is, but right off the bat I would suggest I.E.'s security settings.

They often default these things to the most strict settings because of their potential to be used with malice.

Specifically, in I.E., if the XML is on a different site than the HTML, you may have a security issue.

Check:

Tools->Internet Options->Security(TAB)->Custom Level(Button)

Then scroll down to:

   Miscellaneous
      Access Data Sources across Domains

Then check either Enable or Prompt

. . .

Wow! It has been a while since I've had to open I.E. on my laptop. I think I'll do a preemptive reboot now.

-djr

   E-Mail   Ip: Logged
xentelian
New Member


Posts: 7




     
    Re: displaying xml within html   (Date posted: 07/08/06 at 17:13:11) Quote Modify Delete

JR, you rock!

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: displaying xml within html   (Date posted: 07/11/06 at 16:07:42) Quote Modify Delete

Thanks

Always happy to help.

-djr

   E-Mail   Ip: Logged
Reply Please log in first.
Pages: 1
Jump to:

YaBB Board c 2000
YaBB Programming Team
 



















© Copyright 2002 - 2008 Creativyst, Inc.