XML has become a very important emerging standard for E-commerce because of its flexibility and universality. Many software designers are actively developing new systems to handle information in XML formats. We propose a generic architecture for processing XML. We have designed an XML processing system using the latest technologies such as XML, XSLT, HTTP and Java Servlets. Our design is very generic, flexible, scalable, extensible and also suitable for distributed network environments. A main application of the architecture and the system is to support data exchange in electronic commerce systems.