One of the methodologies in the development of information systems is based on structured documents. The Standard Generalized Markup Language (SGML) was defined for the purpose of document structure description. Extensible Markup Language (XML) was defined as a subset of SGML. The goal of the new XML technology is electronic document exchange on World Wide Web. Since then, many well-known software companies have developed systems to process XML documents. The development of text servers for XML documents follows these systems. These technologies support building information systems based on the XML documents. This paper presents a new approach to specification and implementation of text server for indexing and searching XML documents. Specification is given in UML, and implementation in Java programming language.