Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

as3ÈçºÎ¶ÁÈ¡´øÃüÃû¿Õ¼äµÄxml?

ÇëÎÊÓÃas3ÈçºÎ¶ÁÈ¡codeÕâ¸ö×ֶεÄÖµ£¿


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ns2:loginResponse xmlns:ns2="http://service.betserver.online.i3ring.com/">
      <aaaa>
        <code>10103 </code>
        <msg>Member Not Found </msg>
      </aaaa>
    </ns2:loginResponse>
  </soap:Body>
</soap:Envelope>
¶¥Ò»ÏÂÁË£¬Ôõô°ëÌìû¼ûÒ»¸öÈËÓ°£¿


ËãÁË£¬ÎҸijÉobject·½Ê½ÁË£¬¾ÍÊǽ«xmlת³Éobject,È»ºóÔÙȡֵ£¬¾ÍOKÁË¡£º¯ÊýÈçÏ£º

JScript code:

package alducente.services{
public class XMLToObject {

public function XMLToObject() {
}

static public function to(dp:XML,ignoreNamespace:Boolean=false):Object {
if (dp) {
var _obj={};
dp.ignoreWhitespace=true;
pNode(dp,_obj,ignoreNamespace);
return _obj;
}
return null;
}

static private function pNode(node,obj:Object,ignoreNamespace:Boolean):void {
//
if (ignoreNamespace) {
node


Ïà¹ØÎÊ´ð£º

c£«£«ÅжÏxmlºÏ·¨ÐÔ

ÈçºÎÓÃc£«£«³ÌÐòÅжÏxmlÖи÷ÔªËØµÄºÏ·¨ÐÔ£¬Õë¶Ô¸ñʽÉϵĺϷ¨ÐÔ£¬·µ»Ø0»òÕß1
ʹÓÃMSXML£¬¼ÓÔØXMLºó£¬Ê¹ÓÃvalidate·½·¨ÑéÖ¤

¾Ý˵ÄãÒªÔÚlinuxÏÂʹÓá£
linuxÏ¿ÉÒÔʹÓÃLibxml2À´²Ù×÷xml£¬Í¬ÑùÌṩÁËvalidateµÄ·½·¨ ......

XML Schema ÎÊÌâ

ÇóÖú¸÷λ´óϺ£¬Ñ§Éú³É¼¨µ¥XML SchemaµÄÉè¼Æ,XMLÎĵµµÄÉè¼Æ£¬°üº¬µÄÖ÷ÒªÐÅÏ¢£ºÑ§ºÅ¡¢Ñ§ÉúÐÕÃû¡¢Ïµ²¿¡¢°à¼¶¡¢¿¼ÊÔÈÕÆÚ¡¢ÈονÌʦ¡¢Ñ§·Ö¡¢Ñ§Ê±¡¢ÐÞϰÀà±ð¡¢Java³ÌÐòÉè¼Æ³É¼¨,ÍøÂç»ù´¡ÖªÊ¶³É¼¨¡¢ÍøÒ³ÖÆ×÷³É¼¨¡¢Èí¼þ¹¤³Ì³ ......

ÇëÎÊJavaÈçºÎ°Ñxmlתtxt¸ñÊ½ÄØ£¿

½ñÌìÓöµ½Ò»¸öÎÊÌ⣬°ÑxmlÖеÄÖµ×°µ½.txt¸ñʽµÄÎļþÖС£
ÎÒĿǰÏëµ½Á½ÖֱȽϱ¿µÄ·½·¨£º1.¿ÉÒÔͨ¹ýxmlspy±à¼­¹¤¾ßʵÏÖ
  2.ͨ¹ý°Ñxmlת³ÉJavabean£¬È»ºóתµ½excelÖУ¬ÔÙ´Óб£´æÖØÃüÃûΪ. ......

setTextContent±à¼­XMLÎļþÄÚÈÝû±ä»¯

Java code:
/**
* ÉèÖÃÖ¸¶¨µÄÔªËØÃûºÍ½ÚµãË÷ÒýËù¶ÔÓ¦½ÚµãµÄÄÚÈÝ
* @param ÔªËØÃû
* @param ½ÚµãË÷Òý
* @param ÄÚÈÝ
*/
public void setElementContent(String elementName,in ......

ÇóJavaÈçºÎʵÏÖxmlÎļþ

ÒÑÖªÎļþ1.xmlºÍÊý¾ÝÎļþdb.xml£¬ÈçºÎÓÃjava±àд³ÌÐò£¬µÃ³ö2.xmlÎļþ£¿
1.ÒÑÖªxmlÎļþ 1.xml½á¹¹ÈçÏ£º
<cs>
  <cs name="cs1" details="This is cs1" country="China&q ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ