XSLT to transform XML into XML with specific data



I have been reading so many tutorials but can't seem to get anywhere, with what I thought would be a simple task.

I have an xml file outputted from some software in the vague format:



<two>more data</two>

<three> even more data</three>


Fairly straight forward data, nothing really nested.

All I am trying to do is use an xslt file to transform this xml into a new XML file, but with only a few selected fields, e.g. the same structure as before, but only one of the tags

I have tried so many different methods, and I either get nothing at all, or all my data in the new xml file just without tags.

Any clues where to start? To me this looked simple, all the tutorials looked fairly simple, I tried copying them and adjusted for my data, but no avail.



As is usually the case, I think I've got the bottom of what the problem was.

I had a custom namespace in the root node of the XML, which I didnt realise I needed to put in the XSLT file, and then reference that namespace.


Thats a common problem duffman, I got caught out by it until someone told me you needed to include it also.


It's a matter of glee that .we are getting help and benefits from your post . this post is really awesome I ever seen . peoples are also expecting this kind of post . I am thanking the admin who wade it ready for us.

more junk...
This article has been dead for over six months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: