Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML To Tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Divers
Thread ID:
01528731
Message ID:
01529154
Vues:
84
Any XML deserialization into some other type or data requires that the parser knows what it's parsing into and what the source format expresses. XML by itself has no type information and so it can't be parsed without either a structure to go into (table(s), or classes for instance) or a schema that describes the data.

XmlAdapter by default works with a standard table format where each table is a essentially a group of records and it knows how to import this basic format without anything. However, very few XML data follows that schema. You can also provide a schema for XmlAdapter to use and based on that it can create tables for you in some cases.

If you don't have a schema or the schema is nested multiple levels deep your best bet will be to import data with the XmlDOM most likely. Personally if XmlAdapter.

Personally I think it's easier to parse the XML with the DOM then trying to shoehorn XmlAdapater to import data that isn't tabular in the first place (ie. nested XML 'objects') since Xml Objects tend to not be relational and don't have keys to identify relationships properly.

+++ Rick ---

>OK, explain that. I don't know what that means. I'v never used the XmlAdapter before.
>
>Thanks
>
>
>>The XmlAdapter requires XML schema in order to create cursors.
>>
>>>Sergey, I found an XML4.0 parser and installed it. It doesn't crash now, but I get cursors after it runs.
>>>
>>>The file I'm trying t work wit is here:
>>>http://www.maroisconsulting.com/files/advantagebail.xml
>>>
>>>
>>>
>>>>>I have an XML document that I need to convert to a set of tables. What's the way to do this?
>>>>
>>>>You can try XmlAdapter http://www.berezniker.com/content/pages/visual-foxpro/using-xmladapter-create-and-load-nested-xml. If XML is to complex for XmlAdapter, XmlDom will be the next step.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform