001: /* IXMLParser.java NanoXML/Java
002: *
003: * $Revision: 1421 $
004: * $Date: 2006-03-12 09:32:32 -0700 (Sun, 12 Mar 2006) $
005: * $Name$
006: *
007: * This file is part of NanoXML 2 for Java.
008: * Copyright (C) 2001 Marc De Scheemaecker, All Rights Reserved.
009: *
010: * This software is provided 'as-is', without any express or implied warranty.
011: * In no event will the authors be held liable for any damages arising from the
012: * use of this software.
013: *
014: * Permission is granted to anyone to use this software for any purpose,
015: * including commercial applications, and to alter it and redistribute it
016: * freely, subject to the following restrictions:
017: *
018: * 1. The origin of this software must not be misrepresented; you must not
019: * claim that you wrote the original software. If you use this software in
020: * a product, an acknowledgment in the product documentation would be
021: * appreciated but is not required.
022: *
023: * 2. Altered source versions must be plainly marked as such, and must not be
024: * misrepresented as being the original software.
025: *
026: * 3. This notice may not be removed or altered from any source distribution.
027: */
028:
029: package net.n3.nanoxml;
030:
031: /**
032: * IXMLParser is the core parser of NanoXML.
033: *
034: * @author Marc De Scheemaecker
035: * @version $Name$, $Revision: 1421 $
036: */
037: public interface IXMLParser {
038:
039: /**
040: * Sets the reader from which the parser retrieves its data.
041: *
042: * @param reader the reader
043: */
044: public void setReader(IXMLReader reader);
045:
046: /**
047: * Returns the reader from which the parser retrieves its data.
048: *
049: * @return the reader
050: */
051: public IXMLReader getReader();
052:
053: /**
054: * Sets the builder which creates the logical structure of the XML data.
055: *
056: * @param builder the builder
057: */
058: public void setBuilder(IXMLBuilder builder);
059:
060: /**
061: * Returns the builder which creates the logical structure of the XML data.
062: *
063: * @return the builder
064: */
065: public IXMLBuilder getBuilder();
066:
067: /**
068: * Sets the validator that validates the XML data.
069: *
070: * @param validator the validator
071: */
072: public void setValidator(IXMLValidator validator);
073:
074: /**
075: * Returns the validator that validates the XML data.
076: *
077: * @return the validator
078: */
079: public IXMLValidator getValidator();
080:
081: /**
082: * Sets the entity resolver.
083: *
084: * @param resolver the non-null resolver
085: */
086: public void setResolver(IXMLEntityResolver resolver);
087:
088: /**
089: * Returns the entity resolver.
090: *
091: * @return the non-null resolver
092: */
093: public IXMLEntityResolver getResolver();
094:
095: /**
096: * Parses the data and lets the builder create the logical data structure.
097: *
098: * @return the logical structure built by the builder
099: *
100: * @throws net.n3.nanoxml.XMLException if an error occurred reading or parsing the data
101: */
102: public Object parse() throws XMLException;
103:
104: }
|