XML has now become a universal Data Interchange format, its platform-independent, language-independent, system-independent, to the data integration and interaction brought great convenience. The syntax and technical details of the XML itself need to
: In Java development We will certainly use a lot of collections, here I will summarize the common collection classes, the advantages and disadvantages of each collection class, so that we can better use the collection. Now I'm going to use a
Studied the Jabsorb, wrote a few simple examples, hoping to help rookie quick start.
First reference Jabsorb-1.2.2.jar,slf4j-api-1.4.2.jar,slf4j-jdk14-1.4.2.jar,jsonrpc.js
class file:
Package com.test;
Import Java.util.HashMap;
Import
Dom4j feels a bit like JS. Let's take a look at some basic usage of dom4j.
Basic usage
1. Gets the root node of the document.Element Rootelm = Document.getrootelement ();2. Get a single child node of a node.Element memberelm=root.element ("member")
As we all know, there are more and more ways to parse XML, but there are four main approaches: DOM, SAX, Jdom, and dom4j
The following first gives the jar package download addresses for these four methods
DOM: It's all in the Java JDK now, in the
The code is as follows:
String pptfilename = null;
for (iterator it = Fileslist.iterator (); It.hasnext ();) {
if (It.next (). GetId (). toString (). Equals (method)) {
pptfilename = It.next (). GetFilePath ();}
Run times wrong:
In the Java collection framework, the set series is the simplest, and the set interface is the same as the collection interface,Abstractset is also very simple, only three methods are implemented, listed here.
public boolean equals (Object o) {if (o
Xml
This article is mainly about using the Commons-betwixt component to implement the transformation of XML information to Java Bean, the core class to achieve this function is Beanreader, if you look at Betwixt source code, you will find
public
The concept of environmental variables is not unfamiliar, is the operating system environment variables.The system variable is the variable that the Java itself maintains. Acquired by means of System.getproperty.For different operating systems,
Note Learning Java2sdk 1.4.0 Java.util has several important interfaces that are listed here as a summary of learning:
1 java.util.Enumeration
There are two methods hasmoreelements (), Nextelement (). Use the following methods:
Print all elements
Web
As for action, the creation is done by Actionproxy, to see a brief program call
Actionproxy proxy = Actionproxyfactory.getfactory (). Createactionproxy (namespace, ActionName, Extracontext);
Request.setattribute
Today I saw java.util.Collections in this tool class. Public StaticvoidFill (listSuperT>list, T obj) { intSize =list.size (); if(Size instanceofrandomaccess) {//This line for(inti=0; i) List.set (i, obj); }
XML files play an important role in today's web development, from the database connection configuration to the settings of various other parameters, XML files in the application of reflection technology is very important, but also because the XML
I have studied json on my own today and it feels very useful. After testing, it is much faster than google's GSON. At the same time, Jackson can easily convert Java objects into json objects and xml documents, you can also convert json and xml into
J2SE 1.5 provides another form of a for loop. With this form of for loop, you can iterate over objects of types such as arrays and collection in a simpler way. This article describes how to use this loop in a specific way, explaining how to define a
Java container --- Set: HashSet & TreeSet & LinkedHashSet, --- sethashset1. Set interface Overview
SetDo not save repeated elements (how to determine if the elements are the same ?). If you try to add multiple instances of the same object to the Set,
JAVA Collection class-a rare Summary
The following documents are summarized in your learning and hope to help you. If you want to reprint it, thank you.
1. StringBuffer thread security, StringBuilder thread security efficiency is slightly
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.