Re: OFX import in KmyMoney

Benoit GrĂ©goire <[email protected]> Sat, 21 Jan 2012 14:47:04 -0500
Newsgroups gmane.comp.finance.libofx.devel
Organization Technologies Coeus inc.
Message-ID <1738901.glNyNyvm3L@benoitg-t510>
On January 19, 2012 03:00:48 PM Martin Javorek wrote:
> Hi all,
> =

> I'm playing a little bit with KMyMoney software which is using libofx
> library for parsing OFX files. There is a problem regarding parsing OFX
> version 2 file and KMyMoney developers send me to this forum.
> =

> Original post:
> https://mail.kde.org/pipermail/kmymoney-devel/2012-January/007513.html
> Whole thread:
> https://mail.kde.org/pipermail/kmymoney-devel/2012-January/thread.html#75=
13
> (not too long)
> =

> The problem is with character encoding. Even the OFX version 2 (XML file)
> has proper headers set to UTF-8, KMyMoney imports it in UTF-8 only if the
> file has textual headers before <?xml> tag similar to OFX version 1.

That's strange, but I don't know if Kmymoney does any preprocessiong of the =

file before passing it to libofx.  But normally OFX2 files are pure XML.

There were some encoding workarounds in the recently released libofx 0.9.5, =

but I do not believe any of them apply to your situation.

> I'm not a OFX guru, I have read the spec only for a while, but I cannot
> imagine, how to work with XML file, which has those special headers. How =
to
> validate that file against XSD or anything else. It looks for me a little
> bit strange.

Many things in OFX are a little bit strange ;).  In any event, for OFX 1 fi=
les =

are SGML, not XML, and need to be split (header and content) before =

validation.  Libofx handles this internally.
-- =

Benoit Gr=E9goire, ing., PMP, PSM

---------------------------------------------------------------------------=
---
Try before you buy =3D See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2