Brudderman Posted February 20, 2006 Posted February 20, 2006 The XSL stylesheet I'm trying to create is pulling in extra data because I don't know how to point it to the specific node I need to process. Here is the stylesheet text: <?xml version="1.0" encoding="UTF-8" ?> 0 And here is the XML source I'm trying to process: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?OFX OFXHEADER="200" VERSION="201" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?> 0 INFO 20060218172910.000[-6:CST] ENG MyBank 00000 00000 myname 0 0 INFO USD 000000000 000000000 CHECKING 20060201000000.000[-6:CST] 20060218000000.000[-6:CST] DIRECTDEP 20060201000000.000[-6:CST] 100.00 082902757020000000003122050200603200001 AC-000474X98 -REFUNDS PAYMENT 20060202000000.000[-6:CST] -17.58 082902757020000000003122050200603300001 AC-CATHERINE'S -ONLINE PMT CHECK 20060208000000.000[-6:CST] -50.00 082902757020000000003122050200603900003 5112 CHECK CHECK20060216000000.000[-6:CST] -10.00082902757020000000003122050200604700001 5116 CHECK 2786.67 20060219000000.000[-6:CST] What I want to select is the BANKTRANLIST node and then process each STMTTRN within it. But as I have it structured, I'm pulling extraneous date both before and after the BANKTRANLIST node. And that's causing my import to fail. Any suggestions would be appreciated! James
Fenton Posted February 20, 2006 Posted February 20, 2006 The problem is that the data you want is nested way down inside the xml. Once you add all the elements above it it's not that hard to get it out. <?xml version="1.0" encoding="UTF-8" ?> 0
Brudderman Posted February 21, 2006 Author Posted February 21, 2006 (edited) Fenton, >>The problem is that the data you want is nested way down inside the xml. Once you add all the elements above it it's not that hard to get it out. Yes, I could see that but didn't know what to do about it. But you have it working for me now. Thanks! I've also added a calculated replace step to the import script to parse the imported date string into a proper date format. Is that the best way? James Edited February 21, 2006 by Guest
Fenton Posted February 21, 2006 Posted February 21, 2006 Yes, that's a lot of nesting they've got going on, and a lot of abbreviations that look almost the same. It's kind of funny, since one of the guidelines of xml is that it should be both "verbose" and "humanly readable." Instead of doing a scripted Replace, you could put your calculation into an auto-enter, by calculation. You may have to turn the "Do not replace contents" checkbox off to make it happen. Try it with it on first. You'd always want to happen however, so replacing wouldn't hurt anything.
Brudderman Posted February 21, 2006 Author Posted February 21, 2006 Yes, there is a lot of nesting here. This is supposedly the new Quicken QFX format that my bank is now using for transaction downloads. I see that there is an element in the source for check number also, so I'll go back and add it into my XSL. I went ahead with the scripted replace instead of the auto-enter because I also import from other sources (different scripts) that don't need the date changed. I obviously need to do some more study on XML/XSL in case this comes up again. Thanks for putting me straight. James
Recommended Posts
This topic is 6848 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