Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

xml help

11:58 am on Jan 31, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 30, 2009
votes: 0

I have a slight issue that i cannot work out.

I ahve a doc of parts with part numbers and prices etc. roughly 3000 items.

Is there such a way that i can call an xml file to a webpage and display the results.

also how easy would it be to convert an excel .xls sheet into valid xml?
2:12 pm on Jan 31, 2011 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
votes: 0

1) create an XSLT stylesheet for the XML document. Here's a quick example of that [webmasterworld.com]

2) use a server-side programming language (such as PHP or C# or Perl or Python or Ruby etc) to parse the XML, loop through the data, and display it as HTML.
For an XML document with 3K items, showing them all on one page may be cumbersome. You may want to show the data paginated, in which case #1 is not an option.

If you're showing all 3000 items, constructing HTML stright from XML is as fast as any other technique. But if you're paginating the results, or sorting them, or filtering / searching them, then you'll definitely want to import that data into a relational SQL database. Thankfully, importing data from Excel into SQL is easy; most SQL tools have that facility built in. Plus, IMHO SQL is easier to use than XML.

and I believe Excel has an "export as XML" option, if memory serves me right...

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members