root / trunk / build / distribution / IzPack / src / lib / net / n3 / nanoxml / IXMLEntityResolver.java @ 21757
History | View | Annotate | Download (2.54 KB)
1 |
/* IXMLEntityResolver.java NanoXML/Java
|
---|---|
2 |
*
|
3 |
* $Revision: 5819 $
|
4 |
* $Date: 2006-06-14 09:29:09 +0200 $
|
5 |
* $Name$
|
6 |
*
|
7 |
* This file is part of NanoXML 2 for Java.
|
8 |
* Copyright (C) 2001 Marc De Scheemaecker, All Rights Reserved.
|
9 |
*
|
10 |
* This software is provided 'as-is', without any express or implied warranty.
|
11 |
* In no event will the authors be held liable for any damages arising from the
|
12 |
* use of this software.
|
13 |
*
|
14 |
* Permission is granted to anyone to use this software for any purpose,
|
15 |
* including commercial applications, and to alter it and redistribute it
|
16 |
* freely, subject to the following restrictions:
|
17 |
*
|
18 |
* 1. The origin of this software must not be misrepresented; you must not
|
19 |
* claim that you wrote the original software. If you use this software in
|
20 |
* a product, an acknowledgment in the product documentation would be
|
21 |
* appreciated but is not required.
|
22 |
*
|
23 |
* 2. Altered source versions must be plainly marked as such, and must not be
|
24 |
* misrepresented as being the original software.
|
25 |
*
|
26 |
* 3. This notice may not be removed or altered from any source distribution.
|
27 |
*/
|
28 |
|
29 |
package net.n3.nanoxml; |
30 |
|
31 |
|
32 |
import java.io.Reader; |
33 |
|
34 |
|
35 |
/**
|
36 |
* An IXMLEntityResolver resolves entities.
|
37 |
*
|
38 |
* @author Marc De Scheemaecker
|
39 |
* @version $Name$, $Revision: 5819 $
|
40 |
*/
|
41 |
public interface IXMLEntityResolver |
42 |
{ |
43 |
|
44 |
/**
|
45 |
* Adds an internal entity.
|
46 |
*
|
47 |
* @param name the name of the entity.
|
48 |
* @param value the value of the entity.
|
49 |
*/
|
50 |
public void addInternalEntity(String name, |
51 |
String value);
|
52 |
|
53 |
|
54 |
/**
|
55 |
* Adds an external entity.
|
56 |
*
|
57 |
* @param name the name of the entity.
|
58 |
* @param publicID the public ID of the entity, which may be null.
|
59 |
* @param systemID the system ID of the entity.
|
60 |
*/
|
61 |
public void addExternalEntity(String name, |
62 |
String publicID,
|
63 |
String systemID);
|
64 |
|
65 |
|
66 |
/**
|
67 |
* Returns a Java reader containing the value of an entity.
|
68 |
*
|
69 |
* @param xmlReader the current XML reader
|
70 |
* @param name the name of the entity.
|
71 |
*
|
72 |
* @return the reader, or null if the entity could not be resolved.
|
73 |
*
|
74 |
* @throws net.n3.nanoxml.XMLParseException
|
75 |
* If an exception occurred while resolving the entity.
|
76 |
*/
|
77 |
public Reader getEntity(IXMLReader xmlReader, |
78 |
String name)
|
79 |
throws XMLParseException; |
80 |
|
81 |
} |