1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_xml_dom_XDocumentBuilder_idl__
25#define __com_sun_star_xml_dom_XDocumentBuilder_idl__
26
27#ifndef __com_sun_star_uno__XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_xml_dom_XDocument_idl__
32#include <com/sun/star/xml/dom/XDocumentType.idl>
33#endif
34#ifndef __com_sun_star_xml_dom_XDOMImplementation_idl__
35#include <com/sun/star/xml/dom/XDOMImplementation.idl>
36#endif
37#ifndef __com_sun_star_io_XInputStream_idl__
38#include <com/sun/star/io/XInputStream.idl>
39#endif
40
41#ifndef __com_sun_star_xml_sax_SAXException_idl__
42#include <com/sun/star/xml/sax/SAXException.idl>
43#endif
44
45#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__
46#include <com/sun/star/xml/sax/XErrorHandler.idl>
47#endif
48#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__
49#include <com/sun/star/xml/sax/XEntityResolver.idl>
50#endif
51
52
53#ifndef __com_sun_star_io_IOException_idl__
54#include <com/sun/star/io/IOException.idl>
55#endif
56
57module com { module sun { module star { module xml { module dom {
58
59interface XInputStream;
60
61/**
62Builds a new dom tree
63*/
64interface XDocumentBuilder : com::sun::star::uno::XInterface
65{
66
67    /**
68    Obtain an instance of a DOMImplementation object.
69    */
70    XDOMImplementation getDOMImplementation();
71
72    /**
73    Indicates whether or not this parser is configured to understand
74    namespaces.
75    */
76    boolean isNamespaceAware();
77
78    /**
79    Indicates whether or not this parser is configured to validate XML
80    documents.
81    */
82    boolean isValidating();
83
84    /**
85    Obtain a new instance of a DOM Document object to build a DOM tree
86    with.
87    */
88    XDocument newDocument();
89
90    /**
91    Parse the content of the given InputStream as an XML document and
92    return a new DOM Document object.
93    */
94    XDocument parse([in] com::sun::star::io::XInputStream is)
95			raises( com::sun::star::xml::sax::SAXException,
96					com::sun::star::io::IOException );
97
98    /**
99    Parse the content of the given URI as an XML document and return
100    a new DOM Document object.
101    */
102    XDocument parseURI([in] string uri)
103			raises( com::sun::star::xml::sax::SAXException,
104					com::sun::star::io::IOException );
105
106    /**
107    Specify the EntityResolver to be used to resolve entities present
108    in the XML document to be parsed.
109	*/
110    void setEntityResolver([in] com::sun::star::xml::sax::XEntityResolver er);
111
112    /**
113	Specify the ErrorHandler to be used to report errors present in
114    the XML document to be parsed.
115    */
116	void setErrorHandler([in] com::sun::star::xml::sax::XErrorHandler eh);
117
118};
119
120}; }; }; }; };
121
122#endif
123