472,353 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

How do I populate an XSD instance programmatically?

I need to create valid XML data. This data will need to be able to be
validated against an XSD schema. The tool I am trying to use is Xerces
C++. Being new to both C++ and XML, I am a little stumped at how to begin.


I was given XSD schemas that my raw data needs to be converted to. My
initial approach has been to create an "empty" instance of the DOM
structure defined by the XSD file, and then "plug-in" my data in to the
proper nodes. This is apparently not the right way to do this, as I can
not find any examples of this on the net.

If I understand what I've been reading correctly, I need to create a
root node, then manually add all the nodes required to place my raw data
in the proper locations of the hierarchy. It would seem there should be
an easier way to do this, since the DOM structure is already defined in
the XSD file.

Also, is it true that the DOM object cannot be verified in RAM, but must
be saved then reloaded as part of a "conformance" test? Again, it would
seem there should be an easier way to do this.

Most of the examples I have found on the net use XML schema instance
examples that have been contrived by hand. Or they load an existing
instance, tweak it in memory, and then save it. There are many examples
that show how to programmatically create simple XML data that does not
need to conform to an XSD. Are there examples of how to populate an
empty XSD instance?

I feel like I am missing something basic here.


Jul 20 '05 #1
0 1749

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Damian | last post by:
Hi. Is there a way to programatically populate a continuous form? I have an array of descriptions that I want to display in the continuous form...
by: Sharon | last post by:
I have successfully loaded a DataSet object with a XML schema (XSD). Now I wish to populate the tables that was created in the DataSet. I have an...
by: Junior | last post by:
Hi All, I haven't got a response for this question lately and i really need to get this done ASAP. I have a .aspx page that has table two...
by: Eric | last post by:
I have a custom component that can be dragged from the ToolBox onto a Windows Form (which means I can't modify it's constructor to add a name...
by: Beginner | last post by:
Hi, I'm trying to populate a TreeView from an existing and filled in ListView (lvwBuild). lvwBuild is a basic two column listview which can...
by: Tim Kelley | last post by:
Is it possible to populate a grid using code (not binding it to a datasource). Is there something like an additem method? Thanks,
by: | last post by:
Hi all, I want to create a method that does the following: 1) Programmatically instantiate a new XmlDataSource control 2) For each file in a...
by: miztaken | last post by:
Hi, My C# application have a following code to create an instance of Visual Studio. System.Type type =...
by: tlhintoq | last post by:
My project involves reading magstripe cards, capturing an ID number, then spinning off to do some other things including taking a photograph. 99% of...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.