Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 20th, 2006, 09:07 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Attribute

my xsd is this


<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="rows">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="row">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="cell1" type="xs:string" />
              <xs:element name="cell2" type="xs:string" />
            </xs:sequence>
            <xs:attribute name="id" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>





but i am getting the following XML (using writexml from dataset)


<?xml version="1.0" standalone="yes"?>
<rows>
  <row>
    <id>6</id>
    <cell1>Procedure</cell1>
    <cell2>0FRCP</cell2>
  </row>
</rows>


instead of the following:


<?xml version="1.0" standalone="yes"?>
<rows>
  <row id=6>
    <cell1>Federal Rules of Civil Procedure</cell1>
    <cell2>0FRCP</cell2>
  </row>
</rows>


if anyone knows the reason, please help me.

thanks in advance.



Similar Threads
Thread Thread Starter Forum Replies Last Post
XML to EXCEL ATTRIBUTE NOT WORKING pallone XSLT 4 September 7th, 2006 02:17 AM
Problem using XSLT to change XML attribute cbeech1980 XSLT 1 October 18th, 2005 06:26 AM
How to Edit Attribute Value in XML by ASP.Net sibajibasak XML 1 January 20th, 2005 02:07 AM
VB.NET: Get the Attribute and Text out from Xml toytoy Pro VB.NET 2002/2003 0 October 25th, 2004 11:03 PM
Group XML by Attribute values? NotesSensei XSLT 4 July 14th, 2004 11:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.