XML注释搞砸了 - 可能是VB中的一个错误? [英] XML Comment Screwed - Possibly a bug in VB??

查看:70
本文介绍了XML注释搞砸了 - 可能是VB中的一个错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




只是忙着编码并从我的代码中删除了一个程序而且所有的一个

突然出现错误,距离该位置数英里远我删除的代码片段

,它与插入

程序顶部的XML注释有关。


我以前曾经发生这种情况,我无法理解它为什么抱怨,

XML评论是这样的:


''''' '< summary>

''''''如果债券标志设置在安全记录中,我们至少有一个

债券&浮动费用

''''''这个例程找到链接到Security

Record的债券,并将它们作为子节点添加到

'''''主要债券节点。

'''''< / summary>

''''''< param name = " ParentNode">< / param>

'''''< remarks>< / remarks>


这会出错:


"警告1 XML文档解析错误:此

位置不允许有空格。 XML注释将被忽略。


然后我发现如果我删除了& &符号错误消息

消失了???


这是一个按设计吗?或者这是XML评论中的错误吗?


Siv

解决方案

1。这不是错误 - 这是一个警告!

他们是完全不同的东西。


2.&是XML中的转义字符。

如果你想包括一个&在XML中你需要

来指定它& amp;

" Siv" < g@removethistextsivill.com写在留言中

新闻:0C ****************************** **** @ microsof t.com ...





忙着编码并删除程序从我的代码和所有的

突然出现错误,距离代码片段的位置数英里

我删除了它与插入的XML注释有关

程序的顶部。


我之前曾经发生这种情况,我无法理解为什么会这样抱怨

抱怨,XML注释是这样的:


''''''< summary>

''''''如果设置了Bonds标志在安全记录中,我们至少有一个债券和一个债券。浮动费用

''''''这个例程找到链接到Security

Record的债券,并将它们作为子节点添加到

'''''主要债券节点。

'''''< / summary>

''''''< param name = " ParentNode">< / param>

'''''< remarks>< / remarks>


这会出错:


"警告1 XML文档解析错误:

此位置不允许有空格。 XML注释将被忽略。


然后我发现如果我删除了& &符号错误消息

消失了???


这是一个按设计吗?或者这是XML评论中的错误吗?


Siv


嗯事实上,这是一个错误Stephany,但不是系统的错误

但是写评论的人的错误:-)

因为XML遵循相同的规则作为特殊字符的HTML,似乎

这个人不知道这个事实

系统只是警告XML文档会被打破

问候

michel


" Stephany Young" < noone @ localhostschreef in bericht

news:uh **************** @ TK2MSFTNGP03.phx.gbl ...


1.这不是错误 - 这是一个警告!

它们是完全不同的东西。


2.&是XML中的转义字符。

如果你想包括一个&在XML中你需要

来指定它& amp;


" Siv" < g@removethistextsivill.com写在留言中

新闻:0C ****************************** **** @ microsof t.com ...


>

只是忙着编码并从我的程序中删除了一个程序代码和所有突然出现的错误远离我删除的代码位置数英里远,它与插入在
过程顶部的XML注释有关。 br />
我以前曾经发生这种情况,我无法理解它为什么抱怨,XML评论是这样的:

'''''' < summary>
'''''''如果债券标志设置在安全记录中,我们至少有一个债券&浮动充电
''''''这个例程定位链接到安全
记录的债券,并将它们作为子节点添加到主债券节点。
''''''< / summary>
''''''< param name =" ParentNode">< / param>
''''' '< remarks>< / remarks>

这会出错:

"警告1 XML文档解析错误:
此处不允许空格地点。 XML注释将被忽略。

然后我发现我是否删除了& &符号错误消息
消失了???

这是一个按设计吗?或者这是XML评论中的错误吗?

Siv



< blockquote>是的,当然用户犯了一个错误,但重点是VS报告了一个

警告而不是错误。

Michel Posseth [MCP]" < MS ** @ posseth.comwrote in message

news:u9 ************** @ TK2MSFTNGP03.phx.gbl ...
< blockquote class =post_quotes>
其实这是一个错误Stephany,但不是系统的错误

但是写评论的人的错误: - )

因为XML遵循与特殊字符的HTML相同的规则,这个人似乎并不知道这个事实

系统只是警告说XML文档将被破坏


问候

michel


Stephany Young ; < noone @ localhostschreef in bericht

news:uh **************** @ TK2MSFTNGP03.phx.gbl ...


> 1。这不是错误 - 这是一个警告!
它们是完全不同的东西。

2。 &安培;是XML中的转义字符。
如果你想包含一个&在XML中,你需要
将其指定为& amp;

" Siv" < g@removethistextsivill.com写信息
新闻:0C ********************************** @microso ft.com ...


>>

只是忙着编码并从我的代码中删除一个程序所有
突然出现错误,距离我删除的代码片段的位置数远,它与插入到程序顶部的XML注释有关。

我之前曾经发生这种情况,我无法理解它为什么抱怨,XML评论是这样的:

''''''<摘要>
'''''''如果债券标志设置在安全记录中,我们至少有一个债券&浮动充电
''''''这个例程定位链接到安全
记录的债券,并将它们作为子节点添加到主债券节点。
''''''< / summary>
''''''< param name =" ParentNode">< / param>
''''' '< remarks>< / remarks>

这会出错:

"警告1 XML文档解析错误:
此处不允许空格地点。 XML注释将被忽略。

然后我发现我是否删除了& &符号错误消息
消失了???

这是一个按设计吗?或者这是XML评论中的错误吗?



Hi,

Just busily coding away and removed a procedure from my code and all of a
sudden an error came up miles away from the location of the piece of code I
removed and it relates to the XML comment inserted at the top of the
procedure.

I had this happen once before and I couldn''t fathom why it was complaining,
the XML comment is like this:

'''''' <summary>
'''''' If the Bonds flag is set in the security record we have at least one
Bond & Floating Charge
'''''' This routine locates the bonds that are linked to the Security
Record and adds them as sub nodes to
'''''' the main Bonds node.
'''''' </summary>
'''''' <param name="ParentNode"></param>
'''''' <remarks></remarks>

This gives an error:

"Warning 1 XML documentation parse error: Whitespace is not allowed at this
location. XML comment will be ignored. "

I then discovered if I remove the "&" ampersand symbol the error message
goes away???

Is this a "by design" thing or is this a bug in the XML comments??

Siv

解决方案

1. It''s NOT an error - It is a warning!
They are totally different things.

2. & is the escape character in XML.
If you wish to include an & in XML then you need
to specify it as &amp;
"Siv" <g@removethistextsivill.comwrote in message
news:0C**********************************@microsof t.com...

Hi,

Just busily coding away and removed a procedure from my code and all of a
sudden an error came up miles away from the location of the piece of code
I removed and it relates to the XML comment inserted at the top of the
procedure.

I had this happen once before and I couldn''t fathom why it was
complaining, the XML comment is like this:

'''''' <summary>
'''''' If the Bonds flag is set in the security record we have at least
one Bond & Floating Charge
'''''' This routine locates the bonds that are linked to the Security
Record and adds them as sub nodes to
'''''' the main Bonds node.
'''''' </summary>
'''''' <param name="ParentNode"></param>
'''''' <remarks></remarks>

This gives an error:

"Warning 1 XML documentation parse error: Whitespace is not allowed at
this location. XML comment will be ignored. "

I then discovered if I remove the "&" ampersand symbol the error message
goes away???

Is this a "by design" thing or is this a bug in the XML comments??

Siv


Well in fact it is an error Stephany ,, but not an error of the system
but an error of the person who wrote the comment :-)
as XML follows the same rules as HTML for special characters , it seems that
this person wasn`t aware of this fact
the systems just warns that the XML doc will be broken
regards
michel


"Stephany Young" <noone@localhostschreef in bericht
news:uh****************@TK2MSFTNGP03.phx.gbl...

1. It''s NOT an error - It is a warning!
They are totally different things.

2. & is the escape character in XML.
If you wish to include an & in XML then you need
to specify it as &amp;
"Siv" <g@removethistextsivill.comwrote in message
news:0C**********************************@microsof t.com...

>Hi,

Just busily coding away and removed a procedure from my code and all of a
sudden an error came up miles away from the location of the piece of code
I removed and it relates to the XML comment inserted at the top of the
procedure.

I had this happen once before and I couldn''t fathom why it was
complaining, the XML comment is like this:

'''''' <summary>
'''''' If the Bonds flag is set in the security record we have at least
one Bond & Floating Charge
'''''' This routine locates the bonds that are linked to the Security
Record and adds them as sub nodes to
'''''' the main Bonds node.
'''''' </summary>
'''''' <param name="ParentNode"></param>
'''''' <remarks></remarks>

This gives an error:

"Warning 1 XML documentation parse error: Whitespace is not allowed at
this location. XML comment will be ignored. "

I then discovered if I remove the "&" ampersand symbol the error message
goes away???

Is this a "by design" thing or is this a bug in the XML comments??

Siv



Yes, certainly the user made an error, but the point is that VS reported a
warning and not an error.
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u9**************@TK2MSFTNGP03.phx.gbl...

Well in fact it is an error Stephany ,, but not an error of the system
but an error of the person who wrote the comment :-)
as XML follows the same rules as HTML for special characters , it seems
that this person wasn`t aware of this fact
the systems just warns that the XML doc will be broken
regards
michel


"Stephany Young" <noone@localhostschreef in bericht
news:uh****************@TK2MSFTNGP03.phx.gbl...

>1. It''s NOT an error - It is a warning!
They are totally different things.

2. & is the escape character in XML.
If you wish to include an & in XML then you need
to specify it as &amp;
"Siv" <g@removethistextsivill.comwrote in message
news:0C**********************************@microso ft.com...

>>Hi,

Just busily coding away and removed a procedure from my code and all of
a sudden an error came up miles away from the location of the piece of
code I removed and it relates to the XML comment inserted at the top of
the procedure.

I had this happen once before and I couldn''t fathom why it was
complaining, the XML comment is like this:

'''''' <summary>
'''''' If the Bonds flag is set in the security record we have at least
one Bond & Floating Charge
'''''' This routine locates the bonds that are linked to the Security
Record and adds them as sub nodes to
'''''' the main Bonds node.
'''''' </summary>
'''''' <param name="ParentNode"></param>
'''''' <remarks></remarks>

This gives an error:

"Warning 1 XML documentation parse error: Whitespace is not allowed at
this location. XML comment will be ignored. "

I then discovered if I remove the "&" ampersand symbol the error message
goes away???

Is this a "by design" thing or is this a bug in the XML comments??

Siv



这篇关于XML注释搞砸了 - 可能是VB中的一个错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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