📄 xmldocumenthandler.hpp
字号:
/* * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xerces" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache\@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation, and was * originally based on software copyright (c) 1999, International * Business Machines, Inc., http://www.ibm.com . For more information * on the Apache Software Foundation, please see * <http://www.apache.org/>. */ /* * $Log: XMLDocumentHandler.hpp,v $ * Revision 1.7 2004/01/29 11:46:29 cargilld * Code cleanup changes to get rid of various compiler diagnostic messages. * * Revision 1.6 2003/11/28 05:14:34 neilg * update XMLDocumentHandler to enable stateless passing of type information for elements. Note that this is as yet unimplemented. * * Revision 1.5 2003/03/07 18:08:10 tng * Return a reference instead of void for operator= * * Revision 1.4 2002/11/04 15:00:21 tng * C++ Namespace Support. * * Revision 1.3 2002/05/28 20:41:11 tng * [Bug 9104] prefixes dissapearing when schema validation turned on. * * Revision 1.2 2002/02/20 18:17:01 tng * [Bug 5977] Warnings on generating apiDocs. * * Revision 1.1.1.1 2002/02/01 22:21:51 peiyongz * sane_include * * Revision 1.8 2000/03/02 19:54:24 roddey * This checkin includes many changes done while waiting for the * 1.1.0 code to be finished. I can't list them all here, but a list is * available elsewhere. * * Revision 1.7 2000/02/24 20:00:23 abagchi * Swat for removing Log from API docs * * Revision 1.6 2000/02/16 20:29:20 aruna1 * API Doc++ summary changes in * * Revision 1.5 2000/02/16 19:48:56 roddey * More documentation updates * * Revision 1.4 2000/02/15 01:21:30 roddey * Some initial documentation improvements. More to come... * * Revision 1.3 2000/02/09 19:47:27 abagchi * Added docs for startElement * * Revision 1.2 2000/02/06 07:47:48 rahulj * Year 2K copyright swat. * * Revision 1.1.1.1 1999/11/09 01:08:31 twl * Initial checkin * * Revision 1.3 1999/11/08 20:44:37 rahul * Swat for adding in Product name and CVS comment log variable. * */#if !defined(XMLDOCUMENTHANDLER_HPP)#define XMLDOCUMENTHANDLER_HPP#include <xercesc/util/XercesDefs.hpp>#include <xercesc/util/RefVectorOf.hpp>#include <xercesc/framework/XMLAttr.hpp>XERCES_CPP_NAMESPACE_BEGINclass XMLElementDecl;class XMLEntityDecl;/** * This abstract class provides the interface for the scanner to return * XML document information up to the parser as it scans through the * document. * * The interface is very similar to org.sax.DocumentHandler, but * has some extra methods required to get all the data out. */class XMLPARSER_EXPORT XMLDocumentHandler{public: // ----------------------------------------------------------------------- // Constructors are hidden, just the virtual destructor is exposed // ----------------------------------------------------------------------- /** @name Destructor */ //@{ virtual ~XMLDocumentHandler() { } //@} /** @name The document handler interface */ //@{ /** Receive notification of character data. * * <p>The scanner will call this method to report each chunk of * character data. The scanner may return all contiguous character * data in a single chunk, or they may split it into several * chunks; however, all of the characters in any single event * will come from the same external entity, so that the Locator * provides useful information.</p> * * <p>The parser must not attempt to read from the array * outside of the specified range.</p> * * @param chars The content (characters) between markup from the XML * document. * @param length The number of characters to read from the array. * @param cdataSection Indicates that this data is inside a CDATA * section. * @see #ignorableWhitespace * @see Locator */ virtual void docCharacters ( const XMLCh* const chars , const unsigned int length , const bool cdataSection ) = 0; /** Receive notification of comments in the XML content being parsed. * * This scanner will call this method for any comments found in the * content of the document. * * @param comment The text of the comment. */ virtual void docComment ( const XMLCh* const comment ) = 0; /** Receive notification of PI's parsed in the XML content. * * The scanner will call this method for any PIs it finds within the * content of the document. * * @param target The name of the PI. * @param data The body of the PI. This may be an empty string since * the body is optional. */ virtual void docPI ( const XMLCh* const target , const XMLCh* const data ) = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -