C#-XML基础 使用浏览器检查手写的xml文件是否正确

2018-8-14    seo达人

如果您想订阅本博客内容,每天自动发到您的邮箱中, 请点这里

慈心积善融学习,技术愿为有情学。善心速造多好事,前人栽树后乘凉。我今于此写经验,愿见文者得启发。



  •    .NET Framework : 4.6.1
  •                           ide : visual studio 2017 community
  •                             os : win7 x86_64
  •            type setting : markdown
  •                         blog : https://blog.csdn.net/yushaopu
  •                     github : https://github.com/GratefulHeartCoder


xml file - 正确的文件

<?xml version="1.0" encoding="utf-8"?> <cultures> <taoists count="100" comment="good-t"> <book> <name>道德经</name> <author>老子</author> </book> <book> <name>文始真经</name> <author>关尹子</author> </book> </taoists> <buddhism count="321" comment="good-d"> <book> <name>金刚经</name> <author>释迦牟尼</author> </book> <book> <name>地藏菩萨本愿经</name> <author>地藏</author> </book> </buddhism> </cultures>
    
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

使用浏览器进行校验

这里写图片描述


xml file - 错误的

<?xml version="1.0" encoding="utf-8"?> <cultures> <taoists count="100 comment="good-t" <book> <name>道德经</name> <author>老子</author> </book> <book> <na>文始真经</name> <author>关尹子</author> </book> </taoists> <buddhism count="321" comment="good-d"> <book> <name>金刚经</name> <author>释迦牟尼</author> </book> <book> <name>地藏菩萨本愿经</name> <author>地藏</author> </book> </buddhism> </cultures>
    
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

使用浏览器进行校验

这里写图片描述


感想

xml文件挺常用的,用程序自动生成的xml文件最好,引号和尖括号等标点符号肯定是全的。把事情交给擅长它的人去做。知人善任!

蓝蓝设计www.lanlanwork.com )是一家专注而深入的界面设计公司,为期望卓越的国内外企业提供卓越的UI界面设计、BS界面设计 、 cs界面设计 、 ipad界面设计 、 包装设计 、 图标定制 、 用户体验 、交互设计、 网站建设 平面设计服务

分享本文至:

日历

链接

blogger

蓝蓝 http://www.lanlanwork.com

存档