转换xml数据以删除标签并采用简单的文本格式 [英] Convert xml data to remove tags and bring in simple text format

查看:75
本文介绍了转换xml数据以删除标签并采用简单的文本格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用post方法向客户端发送一些数据.在repsonse客户端服务器中向我发送了很长的xml数据.我想以删除所有标签并只留下简单文本的方式来转换此xml数据.

请帮我做.

M. Junaid

Hello to all,

i am sending some data using post method to a client. in repsonse client server sends me a long xml data. I want to convert this xml data in such a way that all tags are removed and just simple text is left.

Please help me to do this.

M. Junaid

推荐答案

您可以使用XSLT转换XML

http://www.w3schools.com/xsl/ [ C#.Net中的XML和XSLT简介 [
You can use XSLT to transform the XML

http://www.w3schools.com/xsl/[^]
Introduction to XML and XSLT in C#.Net[^]




您可以尝试在客户端仅读取xml文本的方法

Hi,

you can try this for readng only text of xml in client side


.ajax({ 类型:" , url:" , dataType:" , 成功:功能(xml){ var data =
.ajax({ type: "GET", url: "sites.xml", dataType: "xml", success: function(xml) { var data=


这篇关于转换xml数据以删除标签并采用简单的文本格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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