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
   Filtering XML
(Moderator: admin)
 Author
Topic: Filtering XML       [Link=41]
Reply Please log in first.
chris
New Member


Posts: 7




     
    Filtering XML   (Date posted: 01/27/03 at 13:50:51) Quote Modify Delete

How can i display XML in HTML with only showing a selected name

for example

http://camelot-europe.goa.com/herald/servers/Excalibur/guilds/23.xml

in this XML there are characters name and i just want to display the data for one single character name - is some sort of 'if' statement possuble?

many thanks

Last modification: chris - 01/27/03 at 13:50:51

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: Filtering XML   (Date posted: 01/27/03 at 15:40:27) Quote Modify Delete

Chris,

I'm not sure, one question before I start working on it though:

Are you ok with insisting that everyone who accesses this data use I.E. only browsers? Keep in mind that AOL is switching to Mozilla in version 8.0 and above.

-John

P.S. Mozilla (http://www.mozilla.org/) is a great browser by the way.

   E-Mail   Ip: Logged
chris
New Member


Posts: 7




     
    Re: Filtering XML   (Date posted: 01/27/03 at 17:17:55) Quote Modify Delete

at the moment i am working on the grounds that all the people that access this are using ie... so yes then

i have now actually got the xml page i will be using - it might make a lot more sense of what i am trying to do with this xml

http://camelot-europe.goa.com/herald/servers/Prydwen/guilds/870.xml

as u will see there are multiple characters and i would like to be able to just have displayed the information for a certain character

i hope that make sense

many thanks

   E-Mail   Ip: Logged
chris
New Member


Posts: 7




     
    Re: Filtering XML   (Date posted: 01/29/03 at 09:22:00) Quote Modify Delete

i presume no1 has any ideas then.....

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: Filtering XML   (Date posted: 02/04/03 at 16:40:54) Quote Modify Delete

Sorry Chris,

Just been busy. The older you get the less time life gives you to devote to the fun stuff.

It will require a little JavaScript "DOM" programming. The DOM is quoted here because it's really I.E. extensions to the same.

To see how this JavaScript interface to the XML is done check out this thread

I actually did a little I.E.-DOM programming there for another impatient one

Let me know what you think of that thread and any attempts. I will try and get more time on this as well. I'm sliding into the deep end of a moderately large project right now though, so please bear with me on the time thing.

-John

P.S. Here's some more information on those nodes (the example program only pulls out the text, but you'll also need nodeName properties).


text Shown in the example code. returns the text of the entire node.
nodeName The element name (i think). You'll need this to test elements to determine which ones you want to display where.
nodeTypeString A string label for the TYPE of the node. For you, the most important ones are "element" and "attribute".
nodeValue If the node is an attribute, this will be a string containg it's value (the thing on the right of the equals sign)
xml Like text but returns ALL the xml inside the node.

Last modification: JRepici - 02/02/03 at 16:06:41

Last modification: JRepici - 02/04/03 at 16:40:54

   E-Mail   Ip: Logged
chris
New Member


Posts: 7




     
    Re: Filtering XML   (Date posted: 02/02/03 at 15:17:36) Quote Modify Delete

hi, thnx for ur help on this matter

the code works fine on my pc but when i upload it i get errors when accessing the page

could this be to do with the ftp i am using

many thanks

chris

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: Filtering XML   (Date posted: 02/04/03 at 17:32:37) Quote Modify Delete

Chris,

That's fantastic.

I think the problem you're having now could (possibly) be because of the security settings in your I.E. browser (they default to NOT allowing outside access to XML). Find a response near the bottom of this thread to Aap, with step-by-step instructions for fixing this. Also, if you email me the URL of the XML I'll be happy to check it out (when time permits).

Lastly, I'm going to go right now and add some node properties that you might find useful to the table directly above your last message. It'll take me a couple of minutes, so if you're online do a refresh for them.

-John

P.S. I put up the extra properties. Let me know how it's going.

(testing something here)

Last modification: JRepici - 02/04/03 at 17:32:37

   E-Mail   Ip: Logged
chris
New Member


Posts: 7




     
    Re: Filtering XML   (Date posted: 02/03/03 at 05:50:42) Quote Modify Delete

thnx for your help

i am still tweaking the pages - but its a shame people will have to change settings to access just a small amount of data

thnx anyway

chris

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: Filtering XML   (Date posted: 02/03/03 at 10:28:38) Quote Modify Delete

Chris,

This is a bit of a "hail Mary" pass, but if memory serves, I think you can get around the problems with I.E. default settings by putting your xml file in the same domain, possibly the same directory where your HTML viewing pages are.

-John

   E-Mail   Ip: Logged
chris
New Member


Posts: 7




     
    Re: Filtering XML   (Date posted: 02/03/03 at 13:17:32) Quote Modify Delete

there is no way i could have the xml on the same domain - is there a way i could create an xml which would be as identical (and updated automatically from the original) as the original xml, which could be put on the same domain as the html?

i hope that makes sense

cheers

chris

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: Filtering XML   (Date posted: 02/03/03 at 13:34:12) Quote Modify Delete

Chris,

I think I actually understood that. I don't know how often the info in the xml file changes or what the copyright permissions are on the original so this might seem like a dumb suggestion...

Why not do a save-as to your local storage and then upload it (FTP?) to your own domain?

If you do this, don't forget to change the data island in your display html to point to the file in the location you've uploaded it to.

-jr

   E-Mail   Ip: Logged
chris
New Member


Posts: 7




     
    Re: Filtering XML   (Date posted: 02/04/03 at 06:37:11) Quote Modify Delete

the xml file updates every couple of hours - so it wouldn't be very practical to save to the ftp everytime it is updated

thanks away

chris

   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.