XML标记在ASP中的格式不正确 [英] XML Tags are not formed correctly in asp

查看:53
本文介绍了XML标记在ASP中的格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有3个ASP页面,分别是test1.asp,test2.asp和test3.asp
在test1.asp中单击链接时,将打开test2.asp,用户将在其中输入输入详细信息的选项.
输入详细信息后,将单击提交"按钮,并打开test3.asp页.
在这里,当加载test2.asp页时,应通过VB从数据库中获取应在该页中显示的值,并且所有值都将形成为XML标记,并且xsl用于显示在test2.asp中. > 用户提供输入后,单击提交按钮时,将通过获取诸如Request.form之类的值在ASP中完成所有验证.
同样,所有值都以XML形式形成并保存到数据库中.

问题在于,当输出以XML形式形成时,我们在一个标签而不是单个标签中得到了逗号分隔的值.

例如:
预期的XML:
< Main>
< book> A</book>
< book> B</book>
< book> C</book>
</Main>

我们得到的是:
< Main>
< book> A,B,C</book>
</Main>

标签名称是test2.asp中的字段名称.
由于标记是逗号分隔的,因此应用程序将引发错误.

请帮助找出导致xml形成逗号分隔值的原因.

We have 3 asp pages, test1.asp, test2.asp and test3.asp
When a link is clicked in test1.asp, the test2.asp will be opened, where the user will have options for entering the input details.
Once the details are entered, the submit button will be clicked and test3.asp page will be opened.
Here, when the test2.asp page is loaded, the values that should be displayed in the page will be fetched from database through VB and all the values are formed as XML tags and xsl is used to display in test2.asp.
Once the input is given by the user, all validation is done in ASP by fetching the values like Request.form, when submit button is clicked.
Again all the values are formed as XML and saved to database.

The issue is when output is formed as XML, we are getting comma separated values in one tag, instead of individual tags.

For example:
Expected XML:
<Main>
<book>A</book>
<book>B</book>
<book>C</book>
</Main>

We are getting as:
<Main>
<book>A, B, C</book>
</Main>

the tag names are the field names in test2.asp.
since the tags are comma separated, the application is throwing error.

Kindly help to identify what causes the xml to form comma separated values.

推荐答案

问题出在如何创建XML标签上,所以将代码发布到如何生成XML上.

The problem lies in how you create XML tags, so post the code how you are generating XML.

以便有人可以帮助您.


这篇关于XML标记在ASP中的格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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