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

¸ñʽ»¯XML£ºÊä³öÓÐËõ½øЧ¹ûµÄXML×Ö·û´®

1. Ò»°ãÇé¿öÏÂʹÓÃÒÔÏ´úÂë¼´¿É½«XML×Ö·û´®ÖØиñʽ»¯£º
        private string FormatXml(string source)
        {
            StringBuilder sb = new StringBuilder();
            XmlTextWriter writer = null;
            
            try
            {
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(source);
                writer = new XmlTextWriter(new StringWriter(sb));
                writer.Formatting = Formatting.Indented;
                
                doc.WriteTo(writer);
            }
            finally
            {
                if (writer != null) writer.Close();
            }
         


Ïà¹ØÎĵµ£º

ÓÃdomÀ´½âÎöxmlÎļþ

xmlÎļþΪ£º
<?xml version="1.0" encoding="UTF-8"?>
<mobile-list>
<mobile type="Nokia2652">
<wap2>false</wap2>
<width>115</width>
</mobile>
<mobile type="Nokia2650">
<wap2>false</wa ......

OpenXml¿ª·¢ Ò»¸öÓ¦ÓÃXmlµÄÀý×Ó


  3private XmlDocument xmlDoc;
  4        //load xml file
  5        private void LoadXml()
  6        { ......

¸ñʽ»¯XMLÊä³ö

ËäÈ»XMLÉè¼ÆµÄ³õÖÔÊÇΪÁË·½±ã»úÆ÷Ö®¼äµÄ½»»¥£¨interoperability£©£¬¶øÐèÒªÂú×ã»úÆ÷¿ÉÔĶÁ£¨machine readable£©µÄÌØÐÔ¡£È»¶ø£¬ÓÉÓÚ³ÌÐòԱΪÁË·½±ã¿ª·¢£¬¼ÈÈ»XMLÊÇͨ¹ýÎı¾±íʾµÄ£¬²»ÈçÔÙÇ¿»¯Ò»Ð©£¬×öµ½ÈËÀà¿ÉÔĶÁ£¨human readable£©°É¡£XML¾¿¾¹ÊÇÄÄÖÖ¿ÉÔĶÁµÄÌÖÂÛÒѾ­ÊÇÀÏÉú³£Ì¸ÁË£¬ÕâÀï²»»áÉîÈë̽ÌÖ£¬Ö»ÊǽèÖúÕâ¸ö»ú»á½éÉÜÒ ......

jms xml namespace

<beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:amq="http://activemq.org/config/1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/bea ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ