需要有关转换的帮助以规范化内联数据 [英] Need help with a transform to normalize inline data

查看:109
本文介绍了需要有关转换的帮助以规范化内联数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有以下XmlNode中的1到N个,我需要将其标准化为下面显示的结构。我用彩色编码和字母作为前缀的各种子节点,试图让我更容易按照我的需要。某些东西对于小组来说是全球性的,然后有4个主要的子项目,天线,馈线,管道和山。请注意,输入管道元素具有需要在输出中拆分为单独元素的属性。前缀为x的项目将从输出中排除。



my:前缀来自InfoPath


xmlns:my =" http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-03-08T15:12:33" xmlns:xsf2



我是Xslt的新手,基本上已经通过了w3schools.com的教程。我想将它与.Net中的XslCompiledTransform类一起使用。我有所有正常工作,我只是不知道如何正确设置Xslt文件。我希望输出也是Xml。提前感谢任何想法和/或建议!






Code Snippet

解决方案

这是一个应该给你一个开头的样式表:





Code Snippet

Hello all,

 

I have 1 to N of the following XmlNodes that I need to normalize into the structure displayed below. I color coded and letter prefixed the various child nodes to try and make it easier to follow what I need. Certain things are global to the group and then there are 4 main child items, Antenna, Feedline, Pipe and Mount. Notice that the input Pipe element has an attribute the needs to be split out into a separate element in the output. Items prefixed with an x are excluded from the output.

 

The my: prefix is from InfoPath

xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-03-08T15:12:33" xmlns:xsf2

 

I am new to Xslt and have basically been through the tutorial at w3schools.com. I want to use this with the XslCompiledTransform class in .Net. I have that all working correctly, I just don't know how to set up the Xslt file correctly. I want the output to be Xml also. Thanks in advance for any ideas and/or suggestions!

 

Code Snippet

解决方案

Here is a stylesheet that should give you a start:

Code Snippet


这篇关于需要有关转换的帮助以规范化内联数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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