Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic Question re MS XML4 objects

Status
Not open for further replies.

mattKnight

Programmer
Joined
May 10, 2002
Messages
6,239
Location
GB
I am struggling...

I have created a xml file and schema, (hand coded using XML spy) which validate correctly (well formed and complies with schema)

It has elements that have datatype dateTime and Duration. There are also some otehr elements using simple data types (string int etc)

I am attempting to read these files into a system I am writing (Visual C++) using the MSXML4 objects. I have had some success and some failure too!

First, I have a couple of test files that contain schema errors (to test the parser is stable with rubbish data)
The files fail the XMLspy schema validation but seemingly pass the MS one i.e. file fails in XML spy but MS passes it as valid. I have also tried this excercise in VB, with the same result. This may be related to the next problem...


which is that the duration data type is not supported by the MS objects.

Can anyone confirm to me that the MS objects are a good implementation? Have I done anything daft? I can't post either the schema, or xmlfiles until later - I am not at a machine with access to them.

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
I finally got a grip on it ....


I was building the the wrong objects DOMDocument20 instead of DOMDocument4.

This still hasn't given me a clue about durations though, although all the durations I need will be expressable as seconds (i.e. probably less than 3600s in general and never exceeding 8 hours) I just need to be a bit careful about overflowing datatypes!

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top