472,975 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

need help with my schema root in my xsd file


I need to use C# to print the xml schema root

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.ciber.com/myfile"
elementFormDefault="qualified" attributeFormDefault="unqualified"

I am having a problem with printing out the
xmlns="http://www.ciber.com/myfile" and maybe other pieces of info.
Because of this, I can load the xsd file on .net studio.
so far, I can only get my code to print the following

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified"
targetNamespace="http://www.ciber.com/myfile" version="1.0"

Here is my code

public void CreateSchemaRoot(string strNameSpace, bool
bElemFormDefault, bool bAttrForm, string strNamespace)
if (strNamespace.Length > 0)
schema.TargetNamespace = strNamespace;
XmlSerializerNamespaces efilens = new XmlSerializerNamespaces();
schema.Namespaces = efilens;

if (bElemFormDefault)
schema.ElementFormDefault = XmlSchemaForm.Qualified;
schema.ElementFormDefault = XmlSchemaForm.Unqualified;
if (bAttrForm)
schema.AttributeFormDefault = XmlSchemaForm.Qualified;
schema.AttributeFormDefault = XmlSchemaForm.Unqualified;
schema.Version = "1.0";
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add(strNameSpace, schemaNS);
schema.Namespaces = ns;
Any help is greatly appreciated. Thanks

Nov 12 '05 #1
0 1062

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

Similar topics

by: Victor Engmark | last post by:
How do I define that the contents of an element should be unique only in a sub-tree of the whole XML file? In my case, I have several documents, each containing several files. The file names...
by: Dominique | last post by:
I want to use a namespace in an XML file, that I have created in the schema for this xml file. do i have to redefine this namespace in the xml file? or is there a way to re-use the definition from...
by: Cat | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm getting a validation error when I try to restrict the content of nested groups with xs:redefine whereas the same restriction on xs:element's...
by: Xavier Seneque | last post by:
hello, i'm trying to parse an XML file from a java program, and the structure of the XML document is described in a schema file. here is the simple schema file (departement.xsd) : <?xml...
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
by: louis_la_brocante | last post by:
Dear all, I am having trouble generating a client proxy for a webservice whose methods return a "complex" type. The type is complex in that it is a class whose members are a mix of primitive...
by: MaLec | last post by:
I’d like to use the DataSet as the container for the XML files conforming to some schema. The problem is, that the operation of reading the XML file into the DataSet having its schema and then...
by: tthunder | last post by:
Hi @all, Please check the following XML file and XML schema definition below first: ------- XML File (full): ------- <?xml version="1.0" encoding="UTF-8"?>
by: icesign | last post by:
I know that the selector of these elements has a scope relative to the element being declared, but maybe there is a way to get beyond bounds of this scope or maybe just a way to extend base element?...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.