我如何缩进给定的XML(how can i indent a given XML)

   IT问题网   2021-02-20 00:00:00

问 题

是否有最简单的方法来缩进给定的xml?



我使用xmldocument类来缩进它。它适用于我,但在xml文件中添加了一些特殊字符。



怎么办?

解决方案

"...在xml文件中添加一些特殊字符"究竟是什么意思?这些不祥的角色在哪里添加,它们看起来像什么。如果您有可用的十六进制编辑器,您可以告诉我们这些字符的二进制表示。



我刚刚想到你可以参考 bom[ ^ ]。由于xml文件通常是utf-8编码,因此这可能也适用于您的情况。但请注意:尽管xml是人类可读的数据格式,但并不意味着它应该是人机界面的一部分。 xml必须格式良好且格式不正确。



最好的问候,



-mrb

标签:如何缩进给定



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

我想将Outlook消息保存到sql server db(i want to save outlook messages to sql server db)

problem hi could you please help me on saving outlook m ...

我如何在cookie中保存令牌(how I can save the token in the cookie)

problem hi, i am creating the web service au ...

C#.net中的ModalPopupExtender(ModalPopupExtender in C#.net)

problem while i am clicking the modal popup extender wind ...

需要帮助来更改密码表格(need help to change password form)

problem hi everyone, i am still newbie in vb. ...

CMap或CMapPtrToPtr(CMap or CMapPtrToPtr)

problem hi, i want store the objects in cmap ...

如何创建新的任务栏(how to create new task bar)

problem hi, i want to create new taskbar,can any one hel ...

在C#.net中旋转PDF文件(Rotate PDF File in C#.net)

problem hi , how to rotate pdf file in c#.net ...

在C#.Net中旋转图像文件(Rotate Image Files in C#.Net)

problem hi, how to rotate image files(jpeg,ti ...

如何交换字符串中的字符(how to swap characters in a string)

problem hi all. i''m new in .net and i want t ...

如何在SHAREPOINT 2010中集成twitter(How to integrate twitter in SHAREPOINT 2010)

problem hi to all, this is siddiqali working ...

检查应用程序是否正在运行(Check If Application Is Running)

problem is there a way to run a loop that wou ...

如何使用radiobuttonlist?(how to use radiobuttonlist)

problem i want to write select query for selectedindexcha ...

如何计算日期差异和数字差异(How to Calculate Date Diff And Num Diff)

problem glnotranscationdate deposit withdraw transid loan ...

ie6浏览器问题在我的网页上(ie6 browser issue in my web page)

problem my webpage displaying 1 inleft bottom corner only ...

无法在表单上使用控件。(Unable to use controls on the form.)

problem hi, i have created some static insta ...

如何在Javascript中使用正则表达式匹配定义的模式(How to match defined pattern using regular expression in Javascript)

problem hi, first, there is a string called: var bookpat ...

我想打印收据,但我遇到了问题(I want to print a reciept but i face a problem)

problem in this project i am using datareport ...

Visual Studio 2010 + Windows 7 + 64位计算机+ C ++ + 32位DLLS = 3个问题(Visual Studio 2010 + Windows 7 + 64-bit computer + C++ + 32 bit DLLS = 3 problems)

problem i''ve been using visual studio 2005 for many year ...

什么是Eclipse以及如何使用它?(What is about Eclipse and how to use it)

problem how to use it .and for what purpose it is used so ...

如何从数据库中检索数据?(how to retrieve data from database)

problem i have a radiobuttonlist control and i want to re ...