Package jetbrains.mps.util
Class JDOMUtil
- java.lang.Object
 - 
- jetbrains.mps.util.JDOMUtil
 
 
- 
public class JDOMUtil extends Object
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJDOMUtil.MyXMLOutputter 
- 
Constructor Summary
Constructors Constructor Description JDOMUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringasString(org.jdom.Document doc)static org.jdom.input.SAXBuildercreateBuilder()static org.jdom.output.XMLOutputtercreateOutputter()static SAXParsercreateSAXParser()static StringescapeText(String text, boolean escapeSpaces, boolean escapeLineEnds)static StringescapeText(String text, boolean escapeApostrophes, boolean escapeSpaces, boolean escapeLineEnds)static org.jdom.DocumentloadDocument(File file)static org.jdom.DocumentloadDocument(InputStream stream)static org.jdom.DocumentloadDocument(Reader reader)static org.jdom.DocumentloadDocument(IFile file)static org.jdom.DocumentloadDocument(InputSource source)static byte[]printDocument(org.jdom.Document document)static StringunescapeText(String text)static voidwriteDocument(org.jdom.Document document, File file)static voidwriteDocument(org.jdom.Document document, OutputStream stream)static voidwriteDocument(org.jdom.Document document, Writer writer)static voidwriteDocument(org.jdom.Document document, String filePath)static voidwriteDocument(org.jdom.Document document, IFile file)static voidwriteDocument(org.jdom.Document document, MultiStreamDataSource source, String streamName)static voidwriteDocument(org.jdom.Document document, StreamDataSource source) 
 - 
 
- 
- 
Method Detail
- 
createSAXParser
public static SAXParser createSAXParser() throws SAXException, ParserConfigurationException
 
- 
loadDocument
public static org.jdom.Document loadDocument(IFile file) throws org.jdom.JDOMException, IOException
- Throws:
 org.jdom.JDOMExceptionIOException
 
- 
loadDocument
public static org.jdom.Document loadDocument(InputSource source) throws org.jdom.JDOMException, IOException
- Throws:
 org.jdom.JDOMExceptionIOException
 
- 
loadDocument
public static org.jdom.Document loadDocument(File file) throws org.jdom.JDOMException, IOException
- Throws:
 org.jdom.JDOMExceptionIOException
 
- 
loadDocument
public static org.jdom.Document loadDocument(InputStream stream) throws org.jdom.JDOMException, IOException
- Throws:
 org.jdom.JDOMExceptionIOException
 
- 
loadDocument
public static org.jdom.Document loadDocument(Reader reader) throws IOException, org.jdom.JDOMException
- Throws:
 IOExceptionorg.jdom.JDOMException
 
- 
asString
public static String asString(org.jdom.Document doc)
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, String filePath) throws IOException- Throws:
 IOException
 
- 
createBuilder
public static org.jdom.input.SAXBuilder createBuilder()
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, IFile file) throws IOException- Throws:
 IOException
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, StreamDataSource source) throws IOException- Throws:
 IOException
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, MultiStreamDataSource source, String streamName) throws IOException- Throws:
 IOException
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, File file) throws IOException- Throws:
 IOException
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, OutputStream stream) throws IOException- Throws:
 IOException
 
- 
printDocument
public static byte[] printDocument(org.jdom.Document document) throws IOException- Throws:
 IOException
 
- 
writeDocument
public static void writeDocument(org.jdom.Document document, Writer writer) throws IOException- Throws:
 IOException
 
- 
createOutputter
public static org.jdom.output.XMLOutputter createOutputter()
 
- 
escapeText
@NotNull public static String escapeText(String text, boolean escapeSpaces, boolean escapeLineEnds)
 
- 
escapeText
@NotNull public static String escapeText(String text, boolean escapeApostrophes, boolean escapeSpaces, boolean escapeLineEnds)
 
 - 
 
 -