Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLDOM building a valid document for an external DTD
Message
 
 
To
12/03/2000 01:50:12
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00344636
Message ID:
00344683
Views:
24
Erik,

We have defined a DTD. It is used by my VFP client to create an XML document filled with data. Document is sent over the network to a C++ server that does some work and returns another XML document that uses a different DTD. I'm to create a generic routine to build the XML document that complies with the first DTD. The code in wwXML uses amembers() to gather the object properties, but the problem is they are in alphabetical order and the tags in the DTD are not defined in that order so the server's XML validation is rejecting the document I send it.

I was planning on using XMLDOM to build the document which will avoid the alphabetical order problem. But how do I "seed" it with just the DTD so it knows what the tree looks like so it can build the nodes in the proper order? The only thing I can find is that you feed the DOM an already valid XML document.

I'd like to use schemas too, but since they are an approved thing yet it's hard to get everyone to buy off on them. I can forsee the same kind of problem though I'd have to get the schema into the DOM without having an actual XML doc built from the schema.

>I'm foggy. Are you trying to create an XML document from a DTD, or the other way around? As you probably know, you can create nodes through the Document object using oDOM.CreateNode(). AFAIK, there is no built in support for constructing a DTD. Sorry if I'm a mile off here.
>
>FWIW, I have discarded the idea of using DTDs in favor of Schemas because of this and all the other reasons that come along with the fact that DTDs are not XML, and Schemas are. Schemas can be read and created with the parser just like the documents they are validating. If you have any control over the decision of which to use, I highly recommend investigating what schemas can get you.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform