|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.xml.XMLUtil
public class XMLUtil
Utilities for working with SAX XML parsing.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
Field Summary | |
---|---|
protected static Logger |
log
The log stream |
Constructor Summary | |
---|---|
private |
XMLUtil()
Prevent Instansiation |
Method Summary | |
---|---|
static String |
cleanAllEntities(String broken)
A parse has failed so we can try to kill the broken entities and then have another go. |
static String |
cleanAllTags(String broken)
XML parse failed, so we can try getting rid of all the tags and having another go. |
static void |
debugSAXAttributes(Attributes attrs)
Show the attributes of an element as debug |
static String |
escape(String s)
Normalizes the given string |
static org.jdom.Document |
getDocument(String subject)
Get and load an XML file from the classpath and a few other places into a JDOM Document object. |
private static String |
guessEntity(String broken)
Attempt to guess what the entity should have been and fix it, or remove it if there are no obvious replacements. |
static String |
writeToString(SAXEventProvider provider)
Serialize a SAXEventProvider into an XML String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger log
Constructor Detail |
---|
private XMLUtil()
Method Detail |
---|
public static org.jdom.Document getDocument(String subject) throws org.jdom.JDOMException, IOException
subject
- The name of the desired resource (without any extension)
IOException
- if there is a problem reading the file
org.jdom.JDOMException
- If the resource is not valid XMLpublic static String writeToString(SAXEventProvider provider) throws SAXException
provider
- The source of SAX events
SAXException
public static void debugSAXAttributes(Attributes attrs)
public static String escape(String s)
public static String cleanAllEntities(String broken)
private static String guessEntity(String broken)
public static String cleanAllTags(String broken)
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |