導入SVN工程到myEclipse中
2,新建WEB-INF/src 為source包
3.將工程右鍵點擊,發(fā)布為j2ee web工程
posted @ 2012-07-04 23:12 youngturk 閱讀(1169) | 評論 (0) | 編輯 收藏
posted @ 2012-07-04 23:12 youngturk 閱讀(1169) | 評論 (0) | 編輯 收藏
posted @ 2012-07-02 13:55 youngturk 閱讀(214) | 評論 (0) | 編輯 收藏
posted @ 2012-06-29 10:26 youngturk 閱讀(1920) | 評論 (0) | 編輯 收藏
posted @ 2012-06-27 15:20 youngturk 閱讀(1652) | 評論 (0) | 編輯 收藏
posted @ 2012-06-21 00:14 youngturk 閱讀(1426) | 評論 (1) | 編輯 收藏
2、依次展開:HEKEY——LOCAL——MACHIME/SOFTWARE/microsoft/WINDOWS/CURRENTVERSION/EXPLORER/DESKTOP/NAMESPACE 在左邊空白外點擊“新建”,選擇:“主鍵”,把它命名為“645FFO40——5081——101B——9F08——00AA002F954E”再把右邊的“默認”的主鍵的鍵值設為“回收站”,然后退出注冊表。就OK啦。
3、要重啟計算機。
只要機器沒有運行過磁盤整理。系統(tǒng)完好.任何時候的文件都可以找回來。也許你已經(jīng)在Excel中完成過上百張財務報表,也許你已利用Excel函數(shù)實現(xiàn)過上千次的復雜運算,也許你認為Excel也不過如此,甚至了無新意。但我們平日里無數(shù)次重復的得心應手的使用方法只不過是Excel全部技巧的百分之一。本專題從Excel中的一些鮮為人知的技巧入手,領略一下關于Excel的別樣風情。
posted @ 2012-06-20 19:59 youngturk 閱讀(218) | 評論 (0) | 編輯 收藏
Attribute | Attribute定義了XML的屬性 |
Branch | Branch為能夠包含子節(jié)點的節(jié)點如XML元素(Element)和文檔(Docuemnts)定義了一個公共的行為, |
CDATA | CDATA 定義了XML CDATA 區(qū)域 |
CharacterData是一個標識接口,標識基于字符的節(jié)點。如CDATA,Comment, Text. | |
Comment | Comment 定義了XML注釋的行為 |
Document | 定義了XML文檔 |
DocumentType |
DocumentType 定義XML DOCTYPE聲明 | |
Element | Element定義XML 元素 |
ElementHandler | ElementHandler定義了 Element 對象的處理器 |
ElementPath | 被 ElementHandler 使用,用于取得當前正在處理的路徑層次信息 |
Entity | Entity定義 XML entity |
Node | Node為所有的dom4j中XML節(jié)點定義了多態(tài)行為 |
NodeFilter 定義了在dom4j節(jié)點中產(chǎn)生的一個濾鏡或謂詞的行為(predicate) | |
ProcessingInstruction | ProcessingInstruction 定義 XML 處理指令. |
Text | Text 定義XML 文本節(jié)點. |
Visitor | Visitor 用于實現(xiàn)Visitor模式. |
XPath | XPath |
// 從文件讀取XML,輸入文件名,返回XML文檔 public Document read(String fileName) throws MalformedURLException, DocumentException { SAXReader reader = new SAXReader(); Document document = reader.read(new File(fileName)); return document; } |
public Element getRootElement(Document doc){ return doc.getRootElement(); } |
// 枚舉所有子節(jié)點 for ( Iterator i = root.elementIterator(); i.hasNext(); ) { Element element = (Element) i.next(); // do something } // 枚舉名稱為foo的節(jié)點 for ( Iterator i = root.elementIterator(foo); i.hasNext();) { Element foo = (Element) i.next(); // do something } // 枚舉屬性 for ( Iterator i = root.attributeIterator(); i.hasNext(); ) { Attribute attribute = (Attribute) i.next(); // do something } |
public void treeWalk() { treeWalk(getRootElement()); } public void treeWalk(Element element) { for (int i = 0, size = element.nodeCount(); i < size; i++) { Node node = element.node(i); if (node instanceof Element) { treeWalk((Element) node); } else { // do something.... } } } |
public class MyVisitor extends VisitorSupport { public void visit(Element element){ System.out.println(element.getName()); } public void visit(Attribute attr){ System.out.println(attr.getName()); } } 調(diào)用: root.accept(new MyVisitor()) |
public void bar(Document document) { List list = document.selectNodes( //foo/bar ); Node node = document.selectSingleNode(//foo/bar/author); String name = node.valueOf( @name ); } |
public void findLinks(Document document) throws DocumentException { List list = document.selectNodes( //a/@href ); for (Iterator iter = list.iterator(); iter.hasNext(); ) { Attribute attribute = (Attribute) iter.next(); String url = attribute.getValue(); } } |
// XML轉字符串 Document document = ...; String text = document.asXML(); // 字符串轉XML String text = <person> <name>James</name> </person>; Document document = DocumentHelper.parseText(text); |
public Document styleDocument( Document document, String stylesheet ) throws Exception { // load the transformer using JAXP TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer( new StreamSource( stylesheet ) ); // now lets style the given document DocumentSource source = new DocumentSource( document ); DocumentResult result = new DocumentResult(); transformer.transform( source, result ); // return the transformed document Document transformedDoc = result.getDocument(); return transformedDoc; } |
public Document createDocument() { Document document = DocumentHelper.createDocument(); Element root = document.addElement(root); Element author1 = root .addElement(author) .addAttribute(name, James) .addAttribute(location, UK) .addText(James Strachan); Element author2 = root .addElement(author) .addAttribute(name, Bob) .addAttribute(location, US) .addText(Bob McWhirter); return document; } |
FileWriter out = new FileWriter( foo.xml ); document.write(out); |
public void write(Document document) throws IOException { // 指定文件 XMLWriter writer = new XMLWriter( new FileWriter( output.xml ) ); writer.write( document ); writer.close(); // 美化格式 OutputFormat format = OutputFormat.createPrettyPrint(); writer = new XMLWriter( System.out, format ); writer.write( document ); // 縮減格式 format = OutputFormat.createCompactFormat(); writer = new XMLWriter( System.out, format ); writer.write( document ); } |
posted @ 2012-06-15 11:14 youngturk 閱讀(645) | 評論 (0) | 編輯 收藏
posted @ 2012-06-14 22:45 youngturk 閱讀(246) | 評論 (0) | 編輯 收藏
d
posted @ 2012-06-14 14:44 youngturk 閱讀(541) | 評論 (0) | 編輯 收藏
posted @ 2012-06-14 08:56 youngturk 閱讀(1092) | 評論 (0) | 編輯 收藏