473,390 Members | 1,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 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.

http://xml.apache.org/xerces-c/

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.

Thanks!


Jul 20 '05 #1
0 1785

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

Similar topics

3
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 and I have a textbox on the form called...
7
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 XML file/string that contain all the needed data...
2
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 column four rows on it. 1. How do i use codebehind C#...
12
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 parameter). VS assigns it an instance name, but the...
6
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 have any number of rows. I would like the first...
2
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,
4
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 named directory, make a "FileSystemItem" element 3)...
13
by: miztaken | last post by:
Hi, My C# application have a following code to create an instance of Visual Studio. System.Type type = System.Type.GetTypeFromProgID("VisualStudio.DTE. 8.0"); Object obj =...
0
tlhintoq
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 this is done and good. All early phases of work...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.