XML DOM½éÉÜ
ÐÄÓêÖ®¼Ò web¿ª·¢
XML DOM½éÉÜ
Ò»¡¢XML DOM¼ò½é
DOM£¨Document Object Model£¬Îĵµ¶ÔÏóÄ£ÐÍ£©ÊÇÒ»ÖÖÓ¦ÓóÌÐò½Ó¿Ú£¨API£©µÄÓ¦Óã¬Ëü½«Îĵµ£¨ÈçXMLÎĵµ£¬HTMLÎĵµµÈ£©¿´³ÉÊÇÒ»¸öÎĵµ¶ÔÏó£¬È»ºóͨ¹ý³ÌÐòÓïÑÔ£¨ÈçJavaScriptµÈ½Å±¾ÓïÑÔ£¬C++µÈ£©µ÷ÓøÃÎĵµ¶ÔÏ󣬶ÔÎĵµÖеÄÊý¾Ý½øÐдæÈ¡£¬²¢ÀûÓóÌÐò¶Ô»ñÈ¡µÄÊý¾Ý½øÐиú½øÒ»²½µÄ´¦Àí¡£
XML DOMÊǽ«XMLÎĵµÒÔDOM·½Ê½°ü×°£¬Í¨¹ýDOM¼¼Êõ£¬Ó¦ÓóÌÐò¼´¿ÉºÜÈÝÒ×µØÌáÈ¡XMLÎĵµÖеÄÊý¾Ý¡£
¶þ¡¢XML DOM¶ÔÏó
IEʵÏÖÁ˶ÔXML DOM¼¼ÊõµÄÖ§³Ö£¬ÌṩÁËÎå¸ö¿ÉÒÔÔڽű¾³ÌÐòÖе÷ÓõÄXML DOM¶ÔÏó£º
£¨1£© XMLDOMDocument
¸Ã¶ÔÏó´ú±íÕû¸öXMLÎĵµ£¬Ëü¾ßÓжàÖÖÊôÐԺͷ½·¨À´»ñÈ¡»ò´´½¨ÆäËûXML DOM¶ÔÏó¡£
£¨2£© XMLDOMNode
¸Ã¶ÔÏó¿ÉÒÔ´ú±íXMLÎĵµµÄ¸ùÔªËØÒÔ¼°¸ùÔªËØϵĸ÷¸ö½Úµã¡£ËüÖ§³ÖÊý¾ÝÀàÐÍ¡¢ÃûÓò¡¢DTDºÍSchema£¬²¢ÇÒÒÔ´ËÀ©Õ¹ºËÐĵÄXML DOM½Úµã½Ó¿Ú¡£
£¨3£© XMLDOMNodeList
¸Ã¶ÔÏó´ú±íXMLÎĵµÖÐһϵÁнڵã×é³ÉµÄÒ»¸ö½ÚµãÁÐ±í£¬²¢ÇÒÖ§³Ö¶Ô¸ÃÁбíµÄ±éÀú¡£
£¨4£© XMLDOMNamedNodeMap
¸Ã¶ÔÏóÖ§³ÖÃûÓòºÍ¶ÔÊôÐÔ¼¯µÄ±éÀú¡£
£¨5£© XMLDOMParseError
¸Ã¶ÔÏóÓÃÓÚ·µ»Ø×î½üÒ»´Î½âÎö´íÎóµÄÏêϸÐÅÏ¢£¬°üÀ¨´íÎóºÅ¡¢´íÎóËùÔÚÐС¢´íÎóËùÔÚ×Ö·ûλÖÃÒÔ¼°¶Ô´íÎóµÄÒ»¸öÃèÊöÎı¾¡£
Èý¡¢XML DOMÊôÐÔ
XML DOMÎĵµµÄ±éÀúÓëHTML DOMµÄ±éÀú·Ç³£ÀàËÆ£¬ÒòΪËüÃǶ¼Êǽڵã²ã´ÎµÄ½á¹¹¡£½ÚµãÊ÷µÄ×²¿ÊÇdocumentElementÊôÐÔ£¬°üº¬ÎĵµµÄ¸ùÔªËØ¡£Ê¹ÓÃϱíÖÐËùÁгöµÄÊôÐÔ£¬¿ÉÒÔ·ÃÎÊÎĵµÖÐÈκÎÔªËØ»òÊôÐÔ¡£
±í4-1 XML DOMÊôÐÔ
Êô ÐÔ
Ãè Êö
attributes
°üº¬µ±Ç°½ÚµãÊôÐÔµÄÊý×é
childNodes
°üº¬×Ó½ÚµãÊý×é
firstChild
Ö¸Ïòµ±Ç°½ÚµãµÄµÚÒ»¸ö×Ó½Úµã
lastChild
Ö¸Ïòµ±Ç°½ÚµãµÄ×îºóÒ»¸ö×Ó½Úµã
nextSibling
·µ»Øµ±Ç
Ïà¹ØÎĵµ£º
Flex ºÍC++ Ö®¼ä´«Êä½á¹¹ÌåÊý¾Ý
Ò»Ö±ÏëÊÔÑéÓýṹÌå´«Êý¾Ý
µ«ÊÇFlex ºÍC++ µÄÀàÐÍËùÕ¼µÄ×Ö½ÚÊýÓÐʱ²»Ò»Ñù
Èçint ÔÚC++ÖÐÕ¾2¸ö×Ö½Ú£¬¶øÔÚFlexÖÐÕ¼4¸ö×Ö½Ú¡£
ת»»±È½ÏÂé·³¡£
×îºó¾ö¶¨ÓÃXML½øÐд«Êä
È»ºóÁ½±ß¶¼¼ÓÒ»¸öXML ½âÎöºÍ·â×°Àà¡£
C++ ¶ËʹÓõÄtinyXML Àà
FlexÖ±½ÓʹÓÃ×Ô¼º´øµÄ E4X Àà
Flex´úÂëÈçÏÂ
&nb ......
±¾ÎĹ²Á½¸öÎļþ£ºtranslate.mxml ºÍ mapmarking.xml
1¡¢translate.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="librar ......
kXMLÊÇÒ»¸öJ2MEƽ̨ÏÂʹÓõÄXMLÓï·¨·ÖÎö³ÌÐò£¬¶ÔÓÚJ2MEÓ¦ÓóÌÐò·Ç³£Êʺϡ£ËüÓÐÒ»¸ö·Ç³£¶ÀÌصÄDOM²Ù×÷·½·¨ºÍ±»³ÆΪPullµÄÓï·¨·ÖÎö·½·¨¡£ËüÓÐÒÔÏÂÌØÐÔ£º
· Ö§³ÖXMLÃû³Æ¿Õ¼ä ¡¡¡¡
· ÓÃ"ËÉÉ¢"ģʽ·ÖÎöHTML»òÆäËüSGML¸ñʽ ¡¡¡¡
· Õ¼ÓúÜÉٵĴ洢¿Õ¼ä£¨21 kbps£© ¡¡¡¡
· »ùÓÚPullµÄ·ÖÎö ¡¡¡¡
......
the content of element type "jboss" must matched loader-respository ,jmx-name,enforce-ejb-restriction,
security-domain,missing-method-permission-excluded-mode,unauthenticated-principal,exception-on-rollback,
webservices,enterprice-beans,assembly-descriptor,resource-managers,invoker-proxy-bin ......
XMLÎļþ×÷ΪÊý¾ÝÊý¾Ý´æ´¢½éÖʵÄÒ»ÖÖ£¬ºÃ´¦ÔÚÓÚ£ºÈκεÄϵͳ¾ù¿ÉÒÔ½âÎöËü¡£
XMLÈ«³Æ£ºExtensible Markup Language£¨À©Õ¹±ê¼ÇÓïÑÔ£©Ê¹ÓÃÎĵµÀàÐͶ¨Ò壨DTD£©»òÕßģʽ£¨Schema£©À´ÃèÊöÊý¾ÝµÄ¡£¿É¹©ÈËÔĶÁ£¬¶øÇÒ»¹»ùÓÚÒ»ÖÖ¹«¹²µÄ¿ª·¢±ê×¼¡£
×î½üÓÉÓÚ¿ª·¢µÄÐèÒª£¬Ò²ÊÇÑо¿ÒÔÏÂXMLµÄ²Ù×÷£¬±¾ÆªÈÕÖ¾Ö÷Òª×ܽáC#.NETÖÐÊÇÈçºÎ²Ù×÷XM ......