XML格式在“文本视图”中有所不同。 [英] XML formats differ in "text view"

查看:72
本文介绍了XML格式在“文本视图”中有所不同。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我生成的代码与Schneider app生成的代码相同,但问题是:

我的XML代码与XML代码不同。

if i用文本编辑器打开我的xml代码它会变得不同在视图之前减少空间..



不能的问题将我的文件导入到他们这边。

但如果我将我的文件格式更改为.xml,我可以导入它。

所以我的问题是如何获得相同的xml格式文本编辑器以及为什么他们在文本视图中有额外的空格。



我正在用下面写的xml





I am generating a code which is same as generated by "Schneider app" but the problem:
my XML code is differ than their XML code.
if i opened my xml code with text editor it comes different "less spaces before the view"..

the problem that i can''t import my file to their side.
but if i change my file format to .xml ,i can import it.
so my question how to get the same xml format in text editor and why they have extra spaces in their "text view".

i''m writing xml with the below


Dim saveFile As New SaveFileDialog()
  saveFile.InitialDirectory = "Desktop"
  saveFile.FileName = fb.Text
  saveFile.Filter = "XML Files Only(*.XML) | *.XML"
  saveFile.ShowDialog()

  Dim doc As XmlDocument = New XmlDocument()
  doc.LoadXml(GenCodeText.Text)
  doc.PreserveWhitespace = false
  doc.Save(saveFile.FileName)





以下是我生成的代码及其生成的代码。



http ://www.4shared.com/rar/7p-WJ31j/Codes.html? [ ^ ]

推荐答案

我将原始文件添加到资源中,然后直接将文本写入其中......它正在运作。
I added the original file to the resources and then write text to it directly...it''s working.


这篇关于XML格式在“文本视图”中有所不同。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆