13. A method for processing an XQuery of a user to retrieve XML data from an XML database using an XML database management system (XDMBS), the XML database comprising XML documents, each XML document comprising one or more structural elements and adhering to an XML schema, wherein at least one of the structural elements is protected against access of a user, the XDBMS, the method comprising: processing, via an optimizer under control of at least one computer, an XQuery of the user comprising one or more XQuery expressions; generating an optimized XQuery execution plan; and executing the optimized XQuery execution plan to retrieve XML data from the XML database, wherein the optimized XQuery execution plan is generated so that all XQuery expressions relating to one or more of the structural elements that are protected against access of the user are ignored by the optimizer.
23. The method of claim 13 , wherein the structure-based and/or instance-based access privileges are defined by Access Control Lists (ACLs).