Thanks for the information. I can certainly work with export-only XML.
I did notice that the accounts section of the XML does not seem to
preserve the account hierarchy.
i.e. The name of an account like Assets:Chequing:Bank is recorded
simply as <name>Bank</bank>.
The full name of the account does seem to be implied by the ordering of the XML:
<accounts>
<account id="0000000001603c50">
<name></name>
<total>
<balance>
<amount>
<commodity flags="S">
<symbol>CAD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
<amount>
<commodity flags="S">
<symbol>USD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
</balance>
</total>
</account>
<account id="000000000160b470">
<name>Assets</name>
<total>
<balance>
<amount>
<commodity flags="S">
<symbol>CAD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
<amount>
<commodity flags="S">
<symbol>USD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
</balance>
</total>
</account>
<account id="000000000160b7d0">
<name>Chequing</name>
<total>
<balance>
<amount>
<commodity flags="S">
<symbol>CAD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
<amount>
<commodity flags="S">
<symbol>USD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
</balance>
</total>
</account>
<account id="000000000160cb40">
<name>Bank</name>
<amount>
<balance>
<amount>
<commodity flags="S">
<symbol>CAD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
<amount>
<commodity flags="S">
<symbol>USD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
</balance>
</amount>
<total>
<balance>
<amount>
<commodity flags="S">
<symbol>CAD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
<amount>
<commodity flags="S">
<symbol>USD</symbol>
</commodity>
<quantity>100</quantity>
</amount>
</balance>
</total>
</account>
But in XML such a relationship should be represented by the structure
of the document, i.e. Chequing should be a sub-element of Assets and
Bank should be a sub-element of Chequing.
When I was preparing the example above I also noticed that the
<amount> entries in the most deeply nested accounts (i.e. Bank) are
duplicated: one set of amount entries followed by a second identical
set inside a <total> tag. Is this duplication intended to handle a
more complex situation?
Thank you,
Ryan
On Thu, Oct 27, 2011 at 1:39 PM, John Wiegley <[email protected]> wrote:
>>>>>> Ryan May <[email protected]> writes:
>
>> Is Ledger 3 supposed to support processing XML or just exporting it?
>
> Ledger 3 only exports, it does not parse.
>
> John
>