Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Tips on creating the perfect xml interface.

Some pointers that will make the process smoother.

10:54 pm on Oct 19, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 27, 2003
votes: 1

Creating the perfect xml interface.

One of the many questions that may come across would be:
1.Are they difficult?
2.Are they fast?
3.Do affiliate people use them?
4.What are the tech problems to work out beforehand?

Are they difficult?
Sure they can be, but with a little forward thinking, the difficulty can be lowered.
When you are designing your xml feed, please make sure to have the xml that is sent out validated against either a Schema or DTD.
Keep the hierarchy simple. This is where the forward thinking comes into play. If you had to build an application that used your xml feed, would you use it? Is the “flow” of the feed convoluted? Have you kept to a state of polymorphism? i.e. A person only has to use hopefully one stylesheet (XSL) to do the transformations.
If you use attributes, don’t load up a tag with 5 to whatever of them. If you find yourself stuffing tags with attributes, stop, take a step back, and redraw your structure.

Are they fast?
It all depends on your code. If you have followed some of the tips above, then the feed will be fast. Keep your weight down. Try to stay at the most 100k for the xml weight.
Keep to the K.I.S.S. system. You'll be glad you did.

Do affiliate people use them?
They sure do. Take a look at amazon web services you’ll see many people creating applications from their interface. An xml interface can be done with any ecommerce genre if you have an affiliate program.

What are the tech problems to work out beforehand?
I will say it again, make sure you validate the stuff you send out with either a DTD or a Schema. If you are running a feed, and have a special character sent out that isn’t defined, then the person that is using the feed is going to be very angry. You just broke their application most likely.

In short, if you follow some of these suggestions, your feed will be easier to maintain, and will be more attractive to people that might be looking for it.

Happy coding!

2:39 am on Oct 20, 2004 (gmt 0)

Senior Member from HK 

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 14, 2002
votes: 20

By the way mac, I've been very impressed with PHP5's Simple XML interface.

While it is experimental, the simplexml_load_string call works really well for simple minded folks like me who have never gotten past learning C.

3:55 pm on Oct 21, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 27, 2003
votes: 1

I glanced at it, and I must say, very nice! It seems like PHP is going to gain a lot more support for XML which will be nice.
3:16 pm on Nov 18, 2004 (gmt 0)

New User

5+ Year Member

joined:May 21, 2013
votes: 0

Hi, its really a good. It gives a very good foundation for a developer to XML as a source of data to the application.