This patent application describes a method and system for remotely accessing and configuring network devices using XML documents and a common design pattern. An XML request is sent from a client to a network device to request that a service be performed locally on the device. The network device includes a service engine that can parse the XML request using an XML DTD, instantiate the requested service, interact with device hardware and software to execute the service, and optionally return a response to the client. The use of XML documents and a common design pattern allows network devices to be accessed and configured in a flexible manner without needing to be pre-programmed for specific requests.