Newbies THMS Posted February 14, 2011 Newbies Posted February 14, 2011 Hello All, I have been playing around with this XML and XSLT for a while and feel like I am banging my head against the wall. I have an XML file generated by FMDiff and I'm trying to pull the data into a FileMaker file. Attached is the XML that I have. FMDiffTEST.xml What I am trying to pull in is just the differences and of those: toplevel, action, old, new So in the example below there would be two records - toplevel = functions, action = delete, old = Trim4, new = "" toplevel = functions, action = insert, old = "", new = uID_Create Copy Any help would be greatly appreciated. Tom __ <functions toplevel='yes'> <object id='#"05"' action='delete'> <name name='Name' action='delete'> <old>Trim4</old> </name> </object> <object id='#"07"' action='insert'> <name name='Name' action='insert'> <new>uID_Create Copy</new> </name> </object> </functions>
comment Posted February 14, 2011 Posted February 14, 2011 Well, the thing is that the XML file is rather more complex than your example - so I am not sure what exactly you want to extract. Anyway, have a look at the attached. fmdiff.zip
Newbies THMS Posted February 14, 2011 Author Newbies Posted February 14, 2011 Thank you very much for this. It does pretty much what I want it to and I think I am good with making some modifications to it. The only piece that still confuses me is how to get the text "scripts" out of the tag <scripts> or <layouts> etc. These tags show with no other information and perhaps it's not possible to pull out the tag when you don't know what it will be. Thanks again, this was a big help. Tom Well, the thing is that the XML file is rather more complex than your example - so I am not sure what exactly you want to extract. Anyway, have a look at the attached.
comment Posted February 14, 2011 Posted February 14, 2011 how to get the text "scripts" out of the tag <scripts> or <layouts> etc. The name() function does that. perhaps it's not possible to pull out the tag when you don't know what it will be. Well, if you knew what it will be, you wouldn't have to pull it out... But if you know where in the hierarchy it will be, then you can use that - as shown in my demo.
Newbies THMS Posted February 14, 2011 Author Newbies Posted February 14, 2011 Thanks again. It finally clicked in my head. The name() function does that. Well, if you knew what it will be, you wouldn't have to pull it out... But if you know where in the hierarchy it will be, then you can use that - as shown in my demo.
Recommended Posts
This topic is 5099 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now