📄 xmltransformer.java
字号:
package net.betterjava.sample.xml.bind;
import org.w3c.dom.Document;
/**
* The interface of transform
*/
public interface XMLTransformer {
/**
* clean any expensive resource
*/
void cleanup();
/**
* The transformation process is completed by XMLTransformer.transform(), we design transform() method as a re-entry method, that means, you can repeat to invoke it to get different output XML with different parameter.
*The return XML contains the mapped node in the data string, those nodes decrypted in the XML schema not map to data will appear as an empty element.
*The validation of the return XML is not a part of the transform() method, generally the XML created by DOM should be valid, on the other hand, we don't closely couple application with transform subsystem, application can use any method to validate returned XML.
*Currently, transform() is not a synchronized method, so if you use it in a mutli-thread environment, a synchronized wrapper is necessary.
* Creation date: (6/2/2002 11:49:50 AM)
* @param data java.lang.String
*/
Document transform(String data) throws WrongFormatException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -