Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- */
- package com.bmchild.service.xml;
- import java.io.IOException;
- import java.io.InputStream;
- import org.dom4j.Document;
- import org.dom4j.Node;
- /**
- * @author bchild
- *
- */
- public interface XMLService {
- String ENCODING = "ISO-8859-1";
- /**
- * Creates an XML document with the root
- *
- * @param root
- * @param xmlMap
- * @return
- */
- Document createDocument(String root);
- /**
- * Recursive method to create an element and, if necessary, its parents and siblings
- * @param document
- * @param xpath to single element
- * @param value if null an empty element will be created
- * @return the created Node
- */
- Node addElementToDocument(Document document, String xpath, String value);
- /**
- * Transforms one xml document to another
- * @param document to transform
- * @param xlsResourceName name of the transformation file
- * @return transformed Document
- */
- Document transformDocument(Document document, String xlsResourceName);
- /**
- * Gets the xml as a string
- * @param document
- */
- String documentToString(Document document);
- /**
- * Gets the input stream for the document based on default settings
- * @param document
- * @return
- * @throws IOException
- */
- InputStream getInputStream(Document document) throws IOException;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement