1 /*
2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.dom;
22
372 * Parsers may not invoke this method while a parse is in progress.
373 * Once a parse is complete, the parser may then parse another XML
374 * document.
375 * <p>
376 * This method is synchronous: it will not return until parsing
377 * has ended. If a client application wants to terminate
378 * parsing early, it should throw an exception.
379 *
380 * @param source The input source for the top-level of the
381 * XML document.
382 *
383 * @exception XNIException Any XNI exception, possibly wrapping
384 * another exception.
385 * @exception IOException An IO exception from the parser, possibly
386 * from a byte stream or character stream
387 * supplied by the parser.
388 */
389 public void parse(XMLInputSource inputSource)
390 throws XNIException, IOException{
391 // no-op
392 }
393
394 /**
395 * Sets the document handler on the last component in the pipeline
396 * to receive information about the document.
397 *
398 * @param documentHandler The document handler.
399 */
400 public void setDocumentHandler(XMLDocumentHandler documentHandler) {
401 fDocumentHandler = documentHandler;
402 } // setDocumentHandler(XMLDocumentHandler)
403
404 /** Returns the registered document handler. */
405 public XMLDocumentHandler getDocumentHandler() {
406 return fDocumentHandler;
407 } // getDocumentHandler():XMLDocumentHandler
408
409 /**
410 * Sets the DTD handler.
411 *
|
1 /*
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.dom;
22
372 * Parsers may not invoke this method while a parse is in progress.
373 * Once a parse is complete, the parser may then parse another XML
374 * document.
375 * <p>
376 * This method is synchronous: it will not return until parsing
377 * has ended. If a client application wants to terminate
378 * parsing early, it should throw an exception.
379 *
380 * @param source The input source for the top-level of the
381 * XML document.
382 *
383 * @exception XNIException Any XNI exception, possibly wrapping
384 * another exception.
385 * @exception IOException An IO exception from the parser, possibly
386 * from a byte stream or character stream
387 * supplied by the parser.
388 */
389 public void parse(XMLInputSource inputSource)
390 throws XNIException, IOException{
391 // no-op
392 }
393
394 /**
395 * Stops the parsing process.
396 */
397 @Override
398 public boolean stop() {
399 // no-op
400 return false;
401 }
402
403 /**
404 * Resumes parsing after it was stopped by calling the stop method.
405 */
406 @Override
407 public boolean resume() {
408 // no-op
409 return false;
410 }
411
412 /**
413 * Sets the document handler on the last component in the pipeline
414 * to receive information about the document.
415 *
416 * @param documentHandler The document handler.
417 */
418 public void setDocumentHandler(XMLDocumentHandler documentHandler) {
419 fDocumentHandler = documentHandler;
420 } // setDocumentHandler(XMLDocumentHandler)
421
422 /** Returns the registered document handler. */
423 public XMLDocumentHandler getDocumentHandler() {
424 return fDocumentHandler;
425 } // getDocumentHandler():XMLDocumentHandler
426
427 /**
428 * Sets the DTD handler.
429 *
|