Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Selecting wrong nodes in XSL

Featured Replies

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

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

  • Author

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. :P 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 by Guest

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.

  • Author

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.