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

¶ÁÈ¡xmlʱ EntityName ʱ³ö´í

public static Hashtable xml_unserialize(string strXml)
        {
//¼ÓÉÏÏÂÃæÕâ¾ä¾ÍºÃÁË
strXml = strXml.Replace("&", "&");
Hashtable ht = new Hashtable();
XmlDocument XMLDom = new XmlDocument();
XMLDom.LoadXml(strXml);
XmlNode newXMLNode = XMLDom.SelectSingleNode("root");
int i = 0;
foreach (XmlNode xn in newXMLNode.ChildNodes)
{
ht.Add(i++, xn.InnerText);
}
return ht;
}
 
 
> ºÍ < ÕâÀà×Ö·ûÊÇXML ±ê¼Ç×Ö·û£¬ÔÚ XML ÖÐÓÐÌØÊâµÄº¬Òå¡£µ±ÔÚ SQL ²éѯ£¨»ò XPath ²éѯ£©ÖÐÖ¸¶¨ÕâЩ×Ö·ûʱ£¬±ØÐë¶ÔËüÃǽøÐÐÊʵ±µÄ±àÂ루Ҳ³ÆÎªÊµÌå±àÂ룩¡£Ï±íÁгöÁËÕâÐ©ÌØÊâ×Ö·û²¢ÃèÊöÁËËüÃǵĺ¬Òå¡£Óйظü¶àÐÅÏ¢£¬Çë²Î¼û XML 1.0 ¹æ·¶ ÖÐµÄ XML 1.0 ¹æ·¶¡£
ÌØÊâ×Ö·û ÌØÊ⺬Òå ʵÌå±àÂë
>           ¿ªÊ¼±ê¼Ç  &gt;
<           ½áÊø±ê¼Ç  &lt;
"            ÒýºÅ        &quot;
'             ƲºÅ       &apos;
&          "&"·û      &amp;
XML ½ÚµãÖв»Äܰüº¬ÕâÐ©ÌØÊâ×Ö·û£¬“&”£¬“<”£¬“>”£¬²»È»½âÎöʱ´ËXML»á±¨´í£¬Ê¹ÓÃʱÐèÒª¶ÔËüת»»ÏÂwww.kobsky.cn СÑÛÊÀ½çãÚ$¡q”yßTL


Ïà¹ØÎĵµ£º

PHP XML²Ù×÷ÀàDOMDocument

²»µÃ²»×ÔÒÑдһ¸ö.XML
µÄ²Ù×÷һֱûÓÐÓùý.ÏÂÃæÊÇ×Ô¼ºËѼ¯µÄXML²Ù×÷Àà
DOMDocumentÏà¹ØµÄÄÚÈÝ.
ÊôÐÔ:
Attributes ´æ´¢½ÚµãµÄÊôÐÔÁбí(Ö»¶Á)
childNodes
´æ´¢½ÚµãµÄ×Ó½ÚµãÁбí(Ö»¶Á)
dataType ·µ»Ø´Ë½ÚµãµÄÊý¾ÝÀàÐÍ
Definition ÒÔDTD»òXMLģʽ¸ø³öµÄ½ÚµãµÄ¶¨Òå(Ö»¶Á)
Doctype Ö¸¶¨ÎĵµÀàÐͽڵã(Ö»¶Á)
doc ......

C#ÐòÁл¯xmlµÄÍêÕûÀý×Ó

C#ÐòÁл¯xml
¹Ø¼ü²½Ö裺
XmlSerializer xSerializer = new XmlSerializer(typeof(MyObj));
StringWriter sWriter = new StringWriter(CultureInfo.InvariantCulture);
XmlTextWriter xTextWriter = new XmlTextWriter(sWriter);
......

php½âÎöxmlʾÀý

<!-- xml ¸ñʽ
<books>
<book id='1001'>
<author>andylin</author>
<title>c language</title>
<publisher id="aaa">O'Reilly</publisher>
</book>

<book id='1002'>
<author>congfeng</author>
<t ......

xml£¬jsp,dtd,xsd ÌáʾÐÅÏ¢

½øÈëMyEclipse6.XÏÂ
Ð޸ģºeclipse.ini Îļþ
-Duser.language=en
¸Ä³É
-Duser.language=zh
µ¯³öÌáʾ£ºCtrl+"/"
dtd ÃüÃû¿Õ¼äµÄÌáʾÐÅÏ¢
window-->Preference-->xml-->XML Catalog-->add
Location :sql-map-2.dtd
key type :pubic ID
key:-//ibatis.apache.org//DTD SQL Map 2.0//EN (XMLÎļþÃüÃû¿Õ¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ