xdfwsl / discuz-ucenter-api-for-java Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/discuz-ucenter-api-for-java
Automatically exported from code.google.com/p/discuz-ucenter-api-for-java
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Feb 2009 at 1:46
1.Current jar file contain the 'class/com/fivestars/...'
shold be 'com/fivestars/...'
2.When I build with maven, there warning : "Sun proprietary api"
recommedate replace the "XMLHelper.java" with code below:
//-------------------------------------------------
package com.fivestars.interfaces.bbs.util;
import java.io.IOException;
import java.util.LinkedList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
* ================================================
* Discuz! Ucenter API for JAVA
* ================================================
* XML工具类,处理UC Client接收到返回结果。
* UC Client会收到UC Server返回的XML结果
* 该类将XML中的数据提取成一个List按顺序读取即可。
*
* 更多信息:http://code.google.com/p/discuz-ucenter-api-for-java/
* 作者:梁平 ([email protected])
* 创建时间:2009-2-20
*/
public class XMLHelper {
public static LinkedList<String> uc_unserialize(String input){
LinkedList<String> result = new LinkedList<String>();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = null;
//DOMParser parser = new DOMParser();
try {
parser = factory.newDocumentBuilder();
Document doc = parser.parse(input);
//Document doc = parser.getDocument();
NodeList nl = doc.getChildNodes().item(0).getChildNodes();
int length = nl.getLength();
for(int i=0;i<length;i++){
if(nl.item(i).getNodeType()==Document.ELEMENT_NODE)
result.add(nl.item(i).getTextContent());
}
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (ParserConfigurationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
return result;
}
}
Original issue reported on code.google.com by [email protected]
on 9 Oct 2009 at 4:57
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.