Click here to Skip to main content
16,005,169 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionHelp for newbie Pin
Konstantin Yazvinski21-May-09 12:28
Konstantin Yazvinski21-May-09 12:28 
AnswerRe: Help for newbie Pin
led mike22-May-09 4:31
led mike22-May-09 4:31 
QuestionSelect XmlElement Help Pin
papy-boom21-May-09 3:27
papy-boom21-May-09 3:27 
QuestionHow to create a tool to generate xslt to transform one xml to another? Pin
salon21-May-09 1:15
salon21-May-09 1:15 
Questionremoving unwanted empty XML elements (this one contains code in a legible form) Pin
Craig Irwin20-May-09 17:37
Craig Irwin20-May-09 17:37 
AnswerRe: removing unwanted empty XML elements (this one contains code in a legible form) [modified] Pin
brifiction24-Apr-10 18:23
brifiction24-Apr-10 18:23 
QuestionRemoving unwanted empty XML elements Pin
Craig Irwin20-May-09 17:22
Craig Irwin20-May-09 17:22 
QuestionASP.Net : Xml Version Format Pin
Vijay Jadhav, India.18-May-09 0:18
Vijay Jadhav, India.18-May-09 0:18 
Hi Experts,

My Xml format is :

<Sis>
  <Student>
    <StudentID>1</StudentID>
    <AcademicDetails>2008-2009</AcademicDetails>
    <PersonalDetails>
      <FirstName>Vijay</FirstName>
      <MiddleName>Laxmanrao</MiddleName>
      <LastName>Jadhav</LastName>
    </PersonalDetails>
  </Student>
</Sis>


I have seen lot of Xml's with Version information ie <? xml version="1.0" ?>.

My question is that what is a cause that my Xml didn't show version and other information.

My Sample code behind for creating Xml is :

#region Create Student Xml String
/* ---------------------------------------------------------- Create Student Xml File --------------------------------------------------------------------- */

private string sCreateStudentXml()
{
    try
    {
        Consumer.Sis studentDS = new Consumer.Sis();
        Sis.StudentRow student_row = studentDS.Student.NewStudentRow();

        student_row.StudentID = 1;
        student_row.AcademicDetails = "2008-2009";

        studentDS.Student.AddStudentRow(student_row);

        Sis.PersonalDetailsRow sub_StudentPersonalDetails_row = studentDS.PersonalDetails.NewPersonalDetailsRow();

        sub_StudentPersonalDetails_row.FirstName = "Vijay";
        sub_StudentPersonalDetails_row.MiddleName = "Laxmanrao";
        sub_StudentPersonalDetails_row.LastName = "Jadhav";
        sub_StudentPersonalDetails_row.StudentRow = student_row;
        studentDS.PersonalDetails.AddPersonalDetailsRow(sub_StudentPersonalDetails_row);

        // Accept the changes
        studentDS.AcceptChanges();

        System.IO.StringWriter writer = new System.IO.StringWriter();

        studentDS.WriteXml(writer, System.Data.XmlWriteMode.WriteSchema);
        return writer.ToString();
    }
    catch (Exception ex)
    {
        throw ex;
    }
}

#endregion


And my Xsd is :

<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio - 30 Day Trial Edition (http://www.liquid-technologies.com)-->
<xsd:schema id="Sis" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:complexType name="StudentPersonalDetails">
    <xsd:sequence>
      <xsd:element name="FirstName" type="xsd:string" />
      <xsd:element name="MiddleName" type="xsd:string" />
      <xsd:element name="LastName" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="StudentType">
    <xsd:sequence>
      <xsd:element name="StudentID" type="xsd:int" />
      <xsd:element name="AcademicDetails" type="xsd:string" />
      <xsd:element name="PersonalDetails" type="StudentPersonalDetails" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ParentPersonalDetails">
    <xsd:sequence>
      <xsd:element name="FirstName" type="xsd:string" />
      <xsd:element name="MiddleName" type="xsd:string" />
      <xsd:element name="LastName" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ParentType">
    <xsd:sequence>
      <xsd:element name="ParentID" type="xsd:int" />
      <xsd:element name="ParentPersonalDetails" type="ParentPersonalDetails" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="Sis">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Student" type="StudentType" />
        <xsd:element name="Parent" type="ParentType" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>


Please help! If anyone know please reply.

Note : I have created above Xml against Xsd.

Thanks.
AnswerRe: ASP.Net : Xml Version Format Pin
Samer Aburabie18-May-09 7:29
Samer Aburabie18-May-09 7:29 
GeneralRe: ASP.Net : Xml Version Format Pin
Vijay Jadhav, India.18-May-09 22:01
Vijay Jadhav, India.18-May-09 22:01 
AnswerRe: ASP.Net : Xml Version Format [modified] Pin
George L. Jackson19-May-09 6:20
George L. Jackson19-May-09 6:20 
GeneralRe: ASP.Net : Xml Version Format Pin
Vijay Jadhav, India.20-May-09 0:55
Vijay Jadhav, India.20-May-09 0:55 
GeneralRe: ASP.Net : Xml Version Format Pin
Vijay Jadhav, India.25-May-09 20:03
Vijay Jadhav, India.25-May-09 20:03 
QuestionASP.NET : Identify XSD on the basis of XML in Web Service [modified] Pin
Vijay Jadhav, India.18-May-09 0:11
Vijay Jadhav, India.18-May-09 0:11 
Questionhow do i delete a xml file ? Pin
YiXiang_8916-May-09 22:47
YiXiang_8916-May-09 22:47 
Questionparse out the member name value Pin
califgal13-May-09 21:22
califgal13-May-09 21:22 
AnswerRe: parse out the member name value Pin
led mike14-May-09 4:36
led mike14-May-09 4:36 
QuestionParsing XML file -exception because element node contains a space in name Pin
califgal13-May-09 16:15
califgal13-May-09 16:15 
AnswerRe: Parsing XML file -exception because element node contains a space in name Pin
Samer Aburabie14-May-09 4:06
Samer Aburabie14-May-09 4:06 
GeneralRe: Parsing XML file -exception because element node contains a space in name Pin
Michael Dunn19-May-09 11:06
sitebuilderMichael Dunn19-May-09 11:06 
QuestionWriting an xml document Pin
dptalt12-May-09 5:55
dptalt12-May-09 5:55 
QuestionStoring binary data in xml file msxml and sending it to client through winsock Pin
hemlat11-May-09 20:27
hemlat11-May-09 20:27 
AnswerRe: Storing binary data in xml file msxml and sending it to client through winsock Pin
led mike12-May-09 4:38
led mike12-May-09 4:38 
QuestionStoring binary data in xml file msxml and sending it to client through winsock Pin
hemlat11-May-09 20:25
hemlat11-May-09 20:25 
AnswerRe: Storing binary data in xml file msxml and sending it to client through winsock Pin
Samer Aburabie14-May-09 4:09
Samer Aburabie14-May-09 4:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.