1.å¦ä½ç¨Eclipseè¿è¡XMLå¼å
å¦ä½ç¨Eclipseè¿è¡XMLå¼å
透视移动端h5源码å®ç»§æ¿ org.eclipse.ui.editors å ä¸å æ¬çç±»ï¼è¿ä¸ªå 为 Eclipse å¹³å°æä¾ä¸ä¸ªæ åææ¬ç¼è¾å¨ååºäºæ件çææ¡£æä¾ç¨åºãè¿ä¸ªç®åç XML ç¼è¾å¨èµ·ç代ç 示ä¾çä½ç¨ï¼æ¨å¯ä»¥æå®ä½ä¸ºèªå·±ç Eclipse XML æ件çåºç¡ãå®çæºä»£ç åªè½éè¿ Eclipse 项ç®å导çæï¼æ¨éè¦æä¸é¢ææè¿°çèªå·±ç¼è¯å®ã è¦æ建è¿ä¸ªåºæ¬ XML ç¼è¾å¨ï¼è½¬è³èå File => Newï¼ç¶åéæ© Projectãå¨é¡¹ç®å导ä¸ï¼éæ© Plug-in Development => Plug-in Projectã å¦æçä¸å° Plug-in Development é项ï¼å表示 Eclipse å¹³å° Runtime Binary 没æ Plug-in å¼åç¯å¢ãè¯·å° eclipse.org ä¸è½½é¡µé¢ä¸è½½ Eclipse å¹³å° Plug-in SDKã åå»Nextãç»é¡¹ç®å½å(å¦ org.my.eclipse.xmleditor)ï¼åå» Nextï¼ç¶åæ¥åå±å¹ Plug-in Project Structure ä¸ç缺çå¼ãæ¥ä¸æ¥éæ© Create a plug-in project using a code generation å导ï¼ç¶åéæ© Plug-in with an editor é项ãå导ä¼èªå¨çæ该 XML ç¼è¾å¨çæºä»£ç ã ä½ä»éç¼è¯å®ãåå» Nextï¼ç¶åå¨ä¸ä¸å±å¹ Simple Plug-in Content ä¸åå» Finish é项;è½¬è³ Project èå并éæ© Rebuild All æ¥æ建该项ç®ã æ¥ä¸æ¥éè¦ä½¿ç¨ File => Export èåå建 editor.jar æ件ã请éåº Eclipseï¼ç¶åå¤å¶æ´ä¸ª org.my.eclipse.xmleditor plugin ç®å½ãå½æ¨å次è¿è¡ Eclipse æ¶ï¼å¯å°ä¸ä¸ª XML æ件添å å°æ¨ç项ç®ä¸ã请记ä½è¿ä¸ªæ ·æ¬ XML ç¼è¾å¨æªæä¾ä»»ä½ä¸ç§éªè¯æè¯æ³æ£æ¥ã ç¨XMLBuddy ç¼å XML æå欢è¿ä¸æé«çº§ç Eclipse XML ç¼è¾å¨æ件æ¯ç± Bocaloco Software å¼åç XMLBuddyãXMLBuddy æ¯å è´¹æ件ï¼å®ä¸º Eclipse å¢æ·»äº XML ç¼è¾è½åï¼å ¶ä¸å æ¬å¯¹ç¨æ·å¯é ç½®çè¯æ³çè²ãDTD 驱å¨ç代ç è¾ å©ãéªè¯ä»¥ååæ¥çæ纲è§å¾ãXML Buddy è¿ä¸º Workspace æ·»å XML éè§å¾ï¼ä¸º XML ææ¡£å DTD æ·»å æ°ç项ç®æ¨¡æ¿ãæ¨å¯ä»¥è±¡å®è£ ä»»ä½å ¶å® Eclipse æ件é£æ ·å®è£ XMLBuddy:åªéå°æ件å缩æ件解å缩è³ä¸» Eclipse å®è£ ç®å½ä¸ç \eclipse\plugins åç®å½å³å¯ãè®°ä½è¦éæ°å¯å¨ Eclipseã XML æ¯å æ è®°è¯è¨ãXML å ç´ ç±èµ·å§æ è®°ãç»ææ è®°åäºè ä¹é´çæ°æ®ç»æï¼å æ¤æäºè¯æ³çªåºæ¾ç¤ºè¿éè¦å¥½çç¼è¾åè½ãXMLBuddy(ç®åæ¯çæ¬ 0.2)ç¨ä»¥ä¸ XML ç¼è¾åè½æ©å± Eclipse: â æ ¼å¼åãå¯ä»¥éè¿éæ©å ¨é¨æé¨å代ç 对æ´ä¸ª XML ææ¡£æé¨åææ¡£èªå¨è¿è¡æ ¼å¼åãâ é«çº§è¯æ³çè²ãå¯éè¿ Window => Preferences => XML => Colors èåé ç½® XML 代ç çè²ãçè²å¯ç¨äºæ®é XML ææ¡£ãDTD(å é¨æå¤é¨åé)å JSP æ件ã â XML 代ç è¾ å©ãæ ¹æ®ææ¡£ç DTDï¼å¯ä¸ºå ç´ æå ¶å®æ è®°å称ãå±æ§å称åå±æ§å¼æä¾è¾ å©ã â æ©å±å符ç¼ç æ¯æãXMLBuddy æ ¹æ® XML 1.0 è§èèªå¨æ£æµææ¡£ç¼ç ï¼å®æ¥å â æ纲(Outline)è§å¾ãæ纲è§å¾çªå£æ¾ç¤ºææ¡£ä¸å ç´ çç»æã缺çæ åµä¸ï¼æ纲ä¸ç¼è¾å¨æåæ¥ãè¿è½ä½¿æ¨å¿«éæµè§ææ¡£çé»è¾ã â DTD çæãå¯ä»¥å¨æå°ä»ææ¡£çå 容çæ DTDãXMLBuddy å¨æ¬å°é«éç¼ååºäºå ç¹ç½ç DTDï¼å æ¤ä¸ç®¡è¦ä½¿ç¨ DTD åç¸å ³çææ¡£å¤å°æ¬¡ï¼åªéä¸è½½å®ä»¬ä¸æ¬¡ã
透视移动端h5源码