1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_xml_dom_XDocumentBuilder_idl__
29#define __com_sun_star_xml_dom_XDocumentBuilder_idl__
30
31#ifndef __com_sun_star_uno__XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34
35#ifndef __com_sun_star_xml_dom_XDocument_idl__
36#include <com/sun/star/xml/dom/XDocumentType.idl>
37#endif
38#ifndef __com_sun_star_xml_dom_XDOMImplementation_idl__
39#include <com/sun/star/xml/dom/XDOMImplementation.idl>
40#endif
41#ifndef __com_sun_star_io_XInputStream_idl__
42#include <com/sun/star/io/XInputStream.idl>
43#endif
44
45#ifndef __com_sun_star_xml_sax_SAXException_idl__
46#include <com/sun/star/xml/sax/SAXException.idl>
47#endif
48
49#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__
50#include <com/sun/star/xml/sax/XErrorHandler.idl>
51#endif
52#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__
53#include <com/sun/star/xml/sax/XEntityResolver.idl>
54#endif
55
56
57#ifndef __com_sun_star_io_IOException_idl__
58#include <com/sun/star/io/IOException.idl>
59#endif
60
61module com { module sun { module star { module xml { module dom {
62
63interface XInputStream;
64
65/**
66Builds a new dom tree
67*/
68interface XDocumentBuilder : com::sun::star::uno::XInterface
69{
70
71    /**
72    Obtain an instance of a DOMImplementation object.
73    */
74    XDOMImplementation getDOMImplementation();
75
76    /**
77    Indicates whether or not this parser is configured to understand
78    namespaces.
79    */
80    boolean isNamespaceAware();
81
82    /**
83    Indicates whether or not this parser is configured to validate XML
84    documents.
85    */
86    boolean isValidating();
87
88    /**
89    Obtain a new instance of a DOM Document object to build a DOM tree
90    with.
91    */
92    XDocument newDocument();
93
94    /**
95    Parse the content of the given InputStream as an XML document and
96    return a new DOM Document object.
97    */
98    XDocument parse([in] com::sun::star::io::XInputStream is)
99			raises( com::sun::star::xml::sax::SAXException,
100					com::sun::star::io::IOException );
101
102    /**
103    Parse the content of the given URI as an XML document and return
104    a new DOM Document object.
105    */
106    XDocument parseURI([in] string uri)
107			raises( com::sun::star::xml::sax::SAXException,
108					com::sun::star::io::IOException );
109
110    /**
111    Specify the EntityResolver to be used to resolve entities present
112    in the XML document to be parsed.
113	*/
114    void setEntityResolver([in] com::sun::star::xml::sax::XEntityResolver er);
115
116    /**
117	Specify the ErrorHandler to be used to report errors present in
118    the XML document to be parsed.
119    */
120	void setErrorHandler([in] com::sun::star::xml::sax::XErrorHandler eh);
121
122};
123
124}; }; }; }; };
125
126#endif
127