Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML extract unknown Tag

 
Gorge Stephens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I quite a beginner with XML and I don't understand how to retrieve an unknown tag. Below is a small sample.

I am able to pull out most of the information that I need however I don't have any idea how to pull out the tag names that I won't know ahead of time.

In the sample below I want to get "fields" and "tos" extracted with the data (old and new) but I won't know their names to put in the xsl. Is this possible to do?

Thanks for any help.

George


 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It isn't going to be possible to do something which you can't describe. That's a basic rule of programming.

It's quite possible you will be able to do what needs to be done, but first you have to describe what needs to be done. I don't see any such description in your post. So, your first step is to describe the requirements. If the element names are unpredictable then that's the way it is, and you'll have to get a description of the requirements which doesn't use element names.
 
Gorge Stephens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for taking the time to reply. I think I get your meaning here.

Best regards,

George
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's good. You can do lots of things with XSLT. If you run into problems when you start implementing your proposed solution, the Ranch is here to help you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic