views:

63

answers:

1

Hello,

I have an XML file ( XML file I produce ) which contains information about my parteners.

I want them to display on their website information relative to them by picking them into the XML file.

I have no idea to do that, ecxept that i need to write a 'parser' in javascript to display information. This javascript code i guess has to be on my partener's website.

could you please provide me examples to do that ? (how to write a parser, how to display only information for one partener ?)

Thank you, Regards

A: 

I think this is a standard problem. Each browser does expose there own version of a Document type object which you can build and then use method like getElementByTagName to grab a particular node in the XML and process its data. Few links which you can look at

http://www.hiteshagrawal.com/javascript/javascript-parsing-xml-in-javascript

http://www.mikechambers.com/blog/2006/01/09/parsing-xml-in-javascript/

I would suggest you to use prototype library for dealing with this

Fazal
thank you, i'll have a look at linksI cannot use prototype nor jQuery, cause it'll mean that if I do so, i'll have to force my parteners to have jQuery or prototype on their website, and i cannot do that.if others user have other "how-to" don't hesitate ;)
Tristan