XML×Ö·û´®ºÍXMLÎĵµÖ®¼äµÄ×ÔÓÉת»»
±¾ÎÄϵתÔØ£¬½÷ÏòתÔØ´¦¿Õ¼äÓµÓÐÕß¼°Ô´³ö´¦ÎÄÕÂ×÷Õß±íʾ¸Ðл£¡
תÔØ´¦£ºhttp://henry19890701.javaeye.com/blog/481462
Ô´³ö´¦£ºhttp://www.ziliaonet.com/tech/netprogramme/XML/200605/69398.html
ÔÚ×öÒ»°ãµÄXMLÊý¾Ý½»»»¹ý³ÌÖУ¬ÎÒ¸üÀÖÒâ´«µÝXML×Ö·û´®£¬¶ø²»ÊǸñʽ»¯µÄXML Document¡£Õâ¾ÍÉæ¼°µ½XML×Ö·û´®ºÍXml DocumentµÄת»»ÎÊÌ⣬˵°×ÁËÕâÊǸöºÜ¼òµ¥µÄÎÊÌ⣬±¾Îľ͸÷ÖÖXML½âÎöÆ÷·Ö±ðÁоÙÈçÏ£¬ÒÔ·½±ã×Ô¼º½ñºó²éÔÄ¡£
Ò»¡¢Ê¹ÓÃ×îÔʼµÄjavax.xml.parsers£¬±ê×¼µÄjdk api
// ×Ö·û´®×ªXML
String xmlStr = "......";
StringReader sr = new StringReader(xmlStr);
InputSource is = new InputSource(sr);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder=factory.newDocumentBuilder();
Document doc = builder.parse(is);
//XMLת×Ö·û´®
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer();
t.setOutputProperty("encoding","GB23121");//½â¾öÖÐÎÄÎÊÌ⣬ÊÔ¹ýÓÃGBK²»ÐÐ
ByteArrayOutputStream bos = new ByteArrayOutputStream();
t.transform(new DOMSource(doc), new StreamResult(bos));
String xmlStr = bos.toString();
ÕâÀïµÄXML DOCUMENTΪorg.w3c.dom.Document
¡¡¡¡¶þ¡¢Ê¹ÓÃdom4jºó³ÌÐò±äµÃ¸ü¼òµ¥
// ×Ö·û´®×ªXML
String xmlStr = "......";
Document document = DocumentHelper.parseText(xmlStr);
// XMLת×Ö·û´®
Document document = ...;
String text = document.asXML();
ÕâÀïµÄXML DOCUMENTΪorg.dom4j.Document
¡¡¡¡Èý¡¢Ê¹ÓÃJDOM
JDOMµÄ´¦Àí·½Ê½ºÍµÚÒ»ÖÖ·½·¨´¦Àí·Ç³£ÀàËÆ
//×Ö·û´®×ªXML
String xmlStr = ".....";
StringReader sr = new StringReader(xmlStr);
InputSource is = new InputSource(sr);
Document doc = (new SAXBuilder()).build(is);
//XMLת×Ö·û´®
Format format = Format.getPrettyFormat();
format.setEncoding("gb2312");//ÉèÖÃxmlÎļþµÄ×Ö·ûΪgb2312£¬½â¾öÖÐÎÄÎÊÌâ
XMLOutputter xmlout = new XMLOutputter(format);
ByteArrayOutputStream bo = new ByteArrayOutputStream();
xmlout.output(doc,bo);
String xmlStr = bo.toString();
ÕâÀïµÄXML DOCUMENTΪorg.jdom.Document
¡¡¡¡ËÄ¡¢JAVASCRIPTÖеĴ¦Àí
//×Ö·û´®×ªXML
Ïà¹ØÎĵµ£º
һЩ×Ö·ûÔÚ URL »ò XML ÎĵµÖÐʹÓÃʱÓÐÌØÊâµÄº¬Ò壬Òò´Ë±ØÐëÕë¶ÔÕâЩº¬Òå¶Ô×Ö·û×öÊʵ±±àÂëÒÔʹÆäÉúЧ¡£
URL ÖеÄÌØÊâ×Ö·û
ÔÚ URL ÉÏÖ´ÐеIJéѯÖУ¬ÌØÊâ×Ö·û±»Ö¸¶¨Îª %xx£¬ÆäÖÐ xx ÊÇ×Ö·ûµÄÊ®Áù½øÖÆÖµ¡£Ï±íÁгöÁËÕâЩÌØÊâ×Ö·û²¢ÃèÊöÁËËüÃǵĺ¬Òå¡£Óйظü¶àÐÅÏ¢£¬Çë²Î¼û http://www.faqs.org/rfcs/rfc1738.html ÖÐµÄ RFC ......
xmlÓÐʲôÓÅÊƺÍÌصã
“¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ”(XML) ÌṩһÖÖÃèÊö½á¹¹»¯Êý¾ÝµÄ·½·¨¡£ÓëÖ÷ÒªÓÃÓÚ¿ØÖÆÊý¾ÝµÄÏÔʾºÍÍâ¹ÛµÄ
HTML ±ê¼Ç²»Í¬£¬XML ±ê¼ÇÓÃÓÚ¶¨ÒåÊý¾Ý±¾ÉíµÄ½á¹¹ºÍÊý¾ÝÀàÐÍ¡£
XML
ʹÓÃÒ»×é±ê¼ÇÀ´Ãè»æÊý¾ÝÔªËØ¡£Ã¿¸öÔªËØ·â×°¿ÉÄÜÊ®·Ö¼òµ¥Ò²¿ÉÄÜÊ®·Ö¸´ÔÓµÄÊý¾Ý¡£Äú¿ÉÒÔ¶¨ÒåÒ»×éÎÞÏÞÖÆµÄ XML ±ê¼Ç¡£ÀýÈç£ ......
ÔÚButtonÉÏ´¥Ãþ°´ÏµÄʱºò£¬ButtonÓÐfocused,pressedºÍdefault״̬£¬¿ÉÒÔʹÓò»Í¬µÄͼƬÀ´ÏÔʾÕâÈýÖÖ״̬¡£
Ïȶ¨ÒåÒ»¸öÃûΪbtnselector.xmlÎļþ£¬´úÂëÈçÏ£º
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/re ......
--±¾ÎÄÕª×Ôhttp://www.moandroid.com/?p=508
By: º£ÊÐò×Â¥ | In: Android¿ª·¢
3 ¾Å 2009
XML ¾³£ÓÃ×÷ Internet ÉϵÄÒ»ÖÖÊý¾Ý¸ñʽ£¬ÆäÎļþ¸ñʽÏë±Ø´ó¼Ò¶¼±È½ÏÇå³þ£¬ÔÚÕâÀïÎÒ½áºÏAndroidƽ̨£¬À´ËµÃ÷Android SDKÌṩµÄ¶ÁдXMLµÄpackage¡£
Ê×ÏȽéÉÜÏÂAndroid SDKÓëJava SDKÔÚ¶ÁдXMLÎļþ·½Ã棬Êý¾Ý°üÖ®¼äµÄ¹Øϵ¡£Android ......
¡¡¡¡¼ÌÐøѧϰD-Bus¡£Ö®Ç°Ñ§Ï°ÁËʹÓõײãµÄAPIÀ´·¢ËÍ£¬¼àÌýÏûÏ¢µÄ·½Ê½¡£ÔÚ
D-
Busѧϰ£¨ËÄ£©£º»ù´¡Ð¡Àý×Ó£¨Í¬²½ºÍÒì²½£©
Ö®ÖУ¬ÎÒÃǸø³öÁËÀûÓÃproxy½øÐз¢ËÍmethod_call£¬²¢µÈ´ýmethod_reply»òÕßerrorµÄclientÇé¿ö¡£ÔÚD-BusÖУ¬¿ÉÒÔ½«D-Bus½Ó¿Ú¶¨ÒåÓÃXML¸ñʽ±íÊö´¦Àí£¬²¢ÀûÓù¤¾ß£¬×Ô¶¯Éú³ÉÍ·Îļþ£¬¸ø³ö¹¤ÕûµÄµ÷Ó÷½Ê½¡ ......