数据集& XML格式 [英] DataSet & XML format

查看:87
本文介绍了数据集& XML格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



你好,大师

我有关于格式XML的问题

我使用ms数据访问构建块来获取数据集存储

程序。数据集的保存xml给我带有元素的数据。

有没有更好的格式化我想要的方法,说一些属性&

一些元素?这简单吗 ??或者我必须在数据集中使用string.format每个

datarow构建xml或通过xslt进行转换?

任何想法??


问候,

.Net新手

***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!


Hello, gurus
I have a problem about format XML
I use ms data access building block to get a data set from stored
procedure. the dataset''s save xml give me data with the elements.
Is there any better way to format what I want ,says some attributes &
some elements ?? Is it easy ?? or I must using string.format each
datarow in the dataset to construct the xml or via xslt to transform ??
any idea ??

Regards,
.Net Newbie
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!

推荐答案

hi

查询你的数据库只检索req的东西

i guess你不操纵批量数据所以更好的选择是去比较数据集

xmldatareader rater

使用XPath而不是使用XMLDocument


你的帖子很困惑我有xslt的东西!

因为需要输出作为XML或只是一些数据???

如果你需要它作为元素(即值)然后去上面的方法


永远不要在每个数据流上使用String.Format(抱歉使用这个词)

垃圾


go thru msdn.microsoft.com/xml


干杯



" .Net_Newbie" < @某处某处>在留言中写道

news:u8 ************** @ TK2MSFTNGP12.phx.gbl ...
hi
Query ur database to retrieve only the req things
i guess u r not manipulating bulk data so the better option is to go for
xmldatareader rater than dataset
Use XPath rather than using XMLDocument

ur posting confused me with the xslt stuff!
coz r u needing the output as XML or just some data???
if u need it a s element (ie values) then go for the above method

Never use String.Format on each datarow it is (sorry to use the word)
rubbish

Go thru msdn.microsoft.com/xml also

Cheers


".Net_Newbie" <somewhere@someplace> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...

你好,大师
我有关于格式XML的问题
我使用ms数据访问构建块从存储的
过程中获取数据集。数据集的保存xml给我带有元素的数据。
有没有更好的方法来格式化我想要的东西,说一些属性&
一些元素?这简单吗 ??或者我必须在数据集中使用string.format每个
datarow构造xml或通过xslt进行转换??



新手

***通过开发人员指南 http://www.developersdex.com发送 ***
不要只是参加USENET ......获得奖励!

Hello, gurus
I have a problem about format XML
I use ms data access building block to get a data set from stored
procedure. the dataset''s save xml give me data with the elements.
Is there any better way to format what I want ,says some attributes &
some elements ?? Is it easy ?? or I must using string.format each
datarow in the dataset to construct the xml or via xslt to transform ??
any idea ??

Regards,
Net Newbie
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!






先生,

感谢您的帮助。

我的目标是让数据库中的数据表示为XML文档

以便其他人可以通过HTTP请求使用我的数据,数据(xml)格式

由其他人(元素或属性)决定。我关心的可能是

XML格式(元素或属性)将由不同的消费者改变

??所以我希望首先通过xslt做到这一点?!作为你的建议,只需使用

xmldatareader而不是数据集。


此外,sql server如何用于xml语法?


问候


***通过开发人员指南 http: //www.developersdex.com ***

不要只是参加USENET ......获得奖励!


Sir,
thanks for your help soon.
My goal is let the data in the database represent as an XML document
so that others can use my data via HTTP request, the data (xml) format
is deccided by others ( element or attribute ). What I care is maybe the
XML format ( element or attribute ) will change by different consumers
?? so I hope to do that via xslt at first?!. As ur suggestions, just use
xmldatareader not dataset.

Besides, how about sql server for xml syntax ??

Regards

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


在另一篇文章中我没有得到你的要求

i以为你想从某些元素或属性中获取价值。

case xmlreader是你可以选择的最佳选择。


我没有得到消费者改变格式的意思.R你提供

XML feed作为web服务?

*如果你想保留xml模式的格式

*如果你的数据只是少,那么使用XMLReader和相关的东西。 />
*使用XPath通过节点迭代


如果这不是东西url可以指示你是否可以指定你的要求。它

在你之前发布的帖子中不清楚

即用什么来计算XML输出?

ru提供网络服务等等


Reg





" .Net_Newbie" < @某处某处>在消息中写道

新闻:Oy ************** @ TK2MSFTNGP09.phx.gbl ...
in the other post i did''nt get ur requirement
i thought u wanna get the value out of some element or attribute.in that
case the xmlreader is the best option u can go for.

I did''nt get waht u meant by "format changed by consumers".R u providing the
XML feed as a webservice?
* if u want to preserve the format go for xml schema
* if ur data is only less then use XMLReader and related stuff.
* Use XPath to iterate thru the nodes

if this is not the thing u r looking for can u plz specify ur requiremnt .it
is not clear in ur previous posting
ie what r u planing to do with XML output?
r u providing a web service?etc

Reg





".Net_Newbie" <somewhere@someplace> wrote in message
news:Oy**************@TK2MSFTNGP09.phx.gbl...

<先生,
感谢您的帮助。
我的目标是让数据库中的数据表示为XML文档
以便其他人可以通过HTTP请求使用我的数据,数据(xml)格式
由其他人(元素或属性)决定。我关心的可能是
XML格式(元素或属性)会由不同的消费者改变
??所以我希望首先通过xslt做到这一点?!作为你的建议,只需使用
xmldatareader而不是数据集。

此外,sql server如何用于xml语法?

问候

***通过开发人员指南 http://www.developersdex.com 发送***


Sir,
thanks for your help soon.
My goal is let the data in the database represent as an XML document
so that others can use my data via HTTP request, the data (xml) format
is deccided by others ( element or attribute ). What I care is maybe the
XML format ( element or attribute ) will change by different consumers
?? so I hope to do that via xslt at first?!. As ur suggestions, just use
xmldatareader not dataset.

Besides, how about sql server for xml syntax ??

Regards

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!



这篇关于数据集&amp; XML格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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