I hope my subject was correct. I am very new to this. I am exporting out data and have a requirement to match a customers schema. Using C# I have been able to create the beginning of an XML document.
So far the content of my document looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Course_Master />
(I am currently not populating any data)
I need it to look like this:
<?xml version="1.0" encoding="utf-8" ?>
<COURSE_MASTER xmlns=" xmlns:xsi=" xsi:noNamespaceSchemaLocation="\\nat001lms\c$\My Doc\COURSE_MASTER.xsd">
The code I have written in C# currently looks like this.
I understand that this info has to do with the XSD information, but I don't know enough about that yet.
Do I need to reference the XSD first and that will bring in this tag, and if so is that how I enforce the schema and how do I do it?
Any help would be greatly appreciated, or even a point towards a good online reference.
Thanks,
Patrick
So far the content of my document looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Course_Master />
(I am currently not populating any data)
I need it to look like this:
<?xml version="1.0" encoding="utf-8" ?>
<COURSE_MASTER xmlns=" xmlns:xsi=" xsi:noNamespaceSchemaLocation="\\nat001lms\c$\My Doc\COURSE_MASTER.xsd">
The code I have written in C# currently looks like this.
Code:
writer.WriteStartDocument();
writer.WriteStartElement("Course_Master");
//future Logic for populating records placed here
{
}
writer.WriteEndElement();
writer.Flush();
writer.Close();
Do I need to reference the XSD first and that will bring in this tag, and if so is that how I enforce the schema and how do I do it?
Any help would be greatly appreciated, or even a point towards a good online reference.
Thanks,
Patrick