XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P12
Số trang: 50
Loại file: pdf
Dung lượng: 165.92 KB
Lượt xem: 14
Lượt tải: 0
Xem trước 5 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P12: Là một nhà phát triển Web, bạn biết những thách thức trong việc xây dựng các ứng dụng mạnh mẽ trên nhiều nền tảng. Tạo các ứng dụng di động trở nên thật sự có thể bằng cách sử dụng Java cho code và XML để tổ chức và quản lý dữ liệu. "XML, XSLT, Java, và JSP: Một trường hợp học" sẽ giúp bạn tối đa hóa khả năng của XML, XSLT, Java, và JSP trong các ứng dụng web của bạn....
Nội dung trích xuất từ tài liệu:
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P12532 Appendix C Source Code for bonForum Web Application if(pathToSubTreeRootNode == null || pathToSubTreeRootNode.length() < 1) { pathToSubTreeRootNode = “”; } parentNodeInDestination = parentNodeInDestination.trim(); if(parentNodeInDestination == null || parentNodeInDestination.length() < 1) { parentNodeInDestination = “things”; } // parse document try { DOMParser parser = new DOMParser(); parser.parse(xmlUri); Document document = parser.getDocument(); try { loadForumXML(pathToSubTreeRootNode, parentNodeInDestination, document, “pathNameHashtable”, sessionId); } catch(Exception ee) { log(sessionId, “err”, “caught exception trying to load into bonForumXML: “+ xmlUri); } } catch(Exception ex) { log(sessionId, “err”, “caught exception trying to parse: “ + xmlUri); } } /** Loads XML from URI into “bonBufferXML” ForestHashtable member. * * * @param pathToSubTreeRootNode String * @param xmlUri String * @param nodeKeyHashtableName String * @param sessionId String */ protected void loadBufferXMLFromURI(String pathToSubTreeRootNode, String parentNodeInDestination, String xmlUri, String nodeKeyHashtableName, String sessionId) { pathToSubTreeRootNode = pathToSubTreeRootNode.trim(); if(pathToSubTreeRootNode == null || pathToSubTreeRootNode.length() < 1) { pathToSubTreeRootNode = “”; } parentNodeInDestination = parentNodeInDestination.trim(); if(parentNodeInDestination == null || parentNodeInDestination.length() < 1) { parentNodeInDestination = “things”; } // parse document try { C.17 Filename: ProjectsonForumsrcde arentforumBonForumStore.java 533 DOMParser parser = new DOMParser(); parser.parse(xmlUri); Document document = parser.getDocument(); try { loadBufferXML(pathToSubTreeRootNode,parentNodeInDestination, document, “pathNameHashtable”, sessionId); } catch(Exception ee) { log(sessionId, “err”, “caught exception trying to loadinto bonBufferXML: “+ xmlUri); } } catch(Exception ex) { log(sessionId, “err”, “caught exception trying to parse: “ +xmlUri); } } /** Loads XML from DOM node into “bonForumXML” ForestHashtable member. * * * @param pathToSubTreeRootNode String * @param parentNodeInDestination String * @param node Node * @param nodeKeyHashtableName String * @param sessionId String */ protected void loadForumXML(String pathToSubTreeRootNode, StringparentNodeInDestination, Node node, String nodeKeyHashtableName, String sessionId){ Object parentNodeKey = null; String nodeKeyPathName = “”; boolean foundParentNodeKey = true; // assume success if(parentNodeInDestination.equals(“actors”)) { parentNodeKey = (Object)getActorsNodeKey(); } else if(parentNodeInDestination.equals(“actions”)) { parentNodeKey = (Object)getActionsNodeKey(); } else if(parentNodeInDestination.equals(“things”)) { parentNodeKey = (Object)getThingsNodeKey(); } else { if(getBonForumXML().getNodeNameHashtable().containsKey(parentNodeInDestination)) { parentNodeKey =getBonForumXML().getNodeNameHashtable().get(parentNodeInDestination); } ...
Nội dung trích xuất từ tài liệu:
XML, XSLT, Java, and JSP: A Case Study in Developing a Web Application- P12532 Appendix C Source Code for bonForum Web Application if(pathToSubTreeRootNode == null || pathToSubTreeRootNode.length() < 1) { pathToSubTreeRootNode = “”; } parentNodeInDestination = parentNodeInDestination.trim(); if(parentNodeInDestination == null || parentNodeInDestination.length() < 1) { parentNodeInDestination = “things”; } // parse document try { DOMParser parser = new DOMParser(); parser.parse(xmlUri); Document document = parser.getDocument(); try { loadForumXML(pathToSubTreeRootNode, parentNodeInDestination, document, “pathNameHashtable”, sessionId); } catch(Exception ee) { log(sessionId, “err”, “caught exception trying to load into bonForumXML: “+ xmlUri); } } catch(Exception ex) { log(sessionId, “err”, “caught exception trying to parse: “ + xmlUri); } } /** Loads XML from URI into “bonBufferXML” ForestHashtable member. * * * @param pathToSubTreeRootNode String * @param xmlUri String * @param nodeKeyHashtableName String * @param sessionId String */ protected void loadBufferXMLFromURI(String pathToSubTreeRootNode, String parentNodeInDestination, String xmlUri, String nodeKeyHashtableName, String sessionId) { pathToSubTreeRootNode = pathToSubTreeRootNode.trim(); if(pathToSubTreeRootNode == null || pathToSubTreeRootNode.length() < 1) { pathToSubTreeRootNode = “”; } parentNodeInDestination = parentNodeInDestination.trim(); if(parentNodeInDestination == null || parentNodeInDestination.length() < 1) { parentNodeInDestination = “things”; } // parse document try { C.17 Filename: ProjectsonForumsrcde arentforumBonForumStore.java 533 DOMParser parser = new DOMParser(); parser.parse(xmlUri); Document document = parser.getDocument(); try { loadBufferXML(pathToSubTreeRootNode,parentNodeInDestination, document, “pathNameHashtable”, sessionId); } catch(Exception ee) { log(sessionId, “err”, “caught exception trying to loadinto bonBufferXML: “+ xmlUri); } } catch(Exception ex) { log(sessionId, “err”, “caught exception trying to parse: “ +xmlUri); } } /** Loads XML from DOM node into “bonForumXML” ForestHashtable member. * * * @param pathToSubTreeRootNode String * @param parentNodeInDestination String * @param node Node * @param nodeKeyHashtableName String * @param sessionId String */ protected void loadForumXML(String pathToSubTreeRootNode, StringparentNodeInDestination, Node node, String nodeKeyHashtableName, String sessionId){ Object parentNodeKey = null; String nodeKeyPathName = “”; boolean foundParentNodeKey = true; // assume success if(parentNodeInDestination.equals(“actors”)) { parentNodeKey = (Object)getActorsNodeKey(); } else if(parentNodeInDestination.equals(“actions”)) { parentNodeKey = (Object)getActionsNodeKey(); } else if(parentNodeInDestination.equals(“things”)) { parentNodeKey = (Object)getThingsNodeKey(); } else { if(getBonForumXML().getNodeNameHashtable().containsKey(parentNodeInDestination)) { parentNodeKey =getBonForumXML().getNodeNameHashtable().get(parentNodeInDestination); } ...
Tìm kiếm theo từ khóa liên quan:
lập trình java phương pháp lập trình lập trình web ngôn ngữ php lập trình cơ bản XMLGợi ý tài liệu liên quan:
-
Giáo trình Lập trình logic trong prolog: Phần 1
114 trang 192 0 0 -
Giáo trình Lập trình C căn bản: Phần 1
64 trang 170 0 0 -
Giáo trình Lập trình C căn bản
135 trang 168 0 0 -
Luận văn tốt nghiệp Công nghệ thông tin: Xây dựng website bán hàng nông sản
67 trang 142 0 0 -
14 trang 134 0 0
-
Tiểu luận môn Công nghệ phần mềm: Tìm hiểu công nghệ nhận diện giọng nói
27 trang 133 0 0 -
[Thảo luận] Học PHP như thế nào khi bạn chưa biết gì về lập trình?
5 trang 131 0 0 -
161 trang 130 1 0
-
Bài giảng Lập trình web nâng cao: Chương 8 - Trường ĐH Văn Hiến
36 trang 117 1 0 -
MỘT SỐ ĐIỂM CẦN CHÚ Ý KHI THIẾT KẾ WEB
5 trang 112 0 0