Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-12

XML

10 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro
to Unknown author: What is wrong with xmlread/xmlwrite ? They can read complete documents or XML snippets.…
What is wrong with xmlread/xmlwrite ? They can read complete documents or XML snippets.

But they exception on assumed closing tags as in my example. If every tag doesn't have a matching </...> it crashes and fails to read.

Unfortunately the OFX file format assumes that if they didn't close the tag by the start of another, that it's closed.

-Tony

Reply by email

Unknown author
to Tony Maro
Tony Maro wrote 8 lines
On Tue, 2002-12-24 at 02:59, wrote: > > > What is wrong with xmlread/xmlwrite ? They can read complete documents > or XML snippets. But they exception on assumed closing tags as in my example. If every tag doesn't have a matching </...> it crashes and fails to read.

That is what valid XML is supposed to do...

Unfortunately the OFX file format assumes that if they didn't close the tag by the start of another, that it's closed.

Then it means the 'OFX' file format is not valid XML :)

Have a look at open xml; it might compile with FPC. http://www.philo.de/xml/

Michael.

Reply by email

Unknown author
to Unknown author: What is wrong with xmlread/xmlwrite ? They can read complete documents or XML snippets.…

Quoting

Show quoted text 9 lines
On 23 Dec 2002, Tony Maro wrote: > Has anyone yet implemented an XML reader / writer that supports more > than just the xmlcfg.pp file does? What is wrong with xmlread/xmlwrite ? They can read complete documents or XML snippets.

true, I've got much more complex structures (up to level 6) than you and it works like a charm.

you should just use structural access in TreeNode component.

but one think I haven't tested and maybe it would be smart to some property in XMLDocument for it.

<?xmlversion="1.0"?>
<!DOCTYPE ..... > for example look at xml document and be informed about type even if file extension is .xml

it would be really nice to know what type of xml document you're dealing with

Michael.

m.

-------------------
http://www.email.si

Reply by email

Tony Maro

Has anyone yet implemented an XML reader / writer that supports more than just the xmlcfg.pp file does?

For instance, I need to interpret the following:

<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<STATUS>
<CODE>2
<SEVERITY>ITEM 2
</STATUS>
</SONRS>
</SIGNONMSGSRSV1>
</OFX>

And view it something like:

OFX
|-SIGNONMSGSRSV1
|-SONRS
+-Status
| |-Code (value = 0)
| |-Severity (Value = "INFO")
+-Status
|-Code (value = 2)
|-Severity (Value = "ITEM 2")

Notice there are two different "Status" nodes, and the values are not within the symbols for Code or Severity.

In other words, I'm trying to interpret an OFX bank file, and it's in a similar format as above... I really don't want to write a custom XML parser for it if I can keep from it.

Tony Maro http://tony.maro.net/ Check out my software "CheckBook Tracker" A GPL (free) replacement for Microsoft Money!

Reply by email

Tony Maro
to Unknown author
Show quoted text 13 lines
On 24 Dec 2002, Martin Waldenburg wrote: > > schrieb: > > Have a look at open xml; it might compile with FPC. > > http://www.philo.de/xml/ > > very, very slow. Maybe, but most other implementations use MSXML. Not very interesting if you use Linux. If you have a link for a faster one, please communicate it !

I'm open to faster - but doesn't really matter. Considering the average Joe will only have to import no more than 80 to 100 entries at a time. I'm not planning on using it for the default file format.

Thanks guys!

-Tony

Reply by email