|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
add xml validation schema in the xml fileI want to add xml validation schema namespace attribute for AutoData root node(xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd")in the following file <AutoData > <Table1> <Data1> 10 </Data1> <Data2> 20 </Data2> <Data3> 40 </Data3> <Table1> </AutoData> So finally the file with valiation schema namespace is like this: <AutoData xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd"> <Table1> <Data1> 10 </Data1> <Data2> 20 </Data2> <Data3> 40 </Data3> <Table1> </AutoData> Anyone knows how to add it? Thanks Martin martin1 wrote:
> I want to add xml validation schema namespace attribute for AutoData root But why did you want to remove the xmlns:xsi namespace declaration in an > node(xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd")in the following > file > <AutoData xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd"> earlier post? That does not make sense, you cannot simply have the xsi:noNamespaceSchemaLocation attribute without having xmlns:xsi declared properly. As for adding an attribute look into the SetAttribute method on XmlElement. Hi, Martin,
when I add attibute <xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd"> using SetAttibute, it drop "xsi:" and just add <noNamespaceSchemaLocation="C:\AutoDataSchema.xsd">, do you know why? Thanks for your time Martin Show quoteHide quote "Martin Honnen" wrote: > martin1 wrote: > > > I want to add xml validation schema namespace attribute for AutoData root > > node(xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd")in the following > > file > > > <AutoData xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd"> > > But why did you want to remove the xmlns:xsi namespace declaration in an > earlier post? That does not make sense, you cannot simply have the > xsi:noNamespaceSchemaLocation attribute without having xmlns:xsi > declared properly. > > As for adding an attribute look into the SetAttribute method on XmlElement. > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ >
update database through SQL script
Iterating through a Hastable of objects Problem Adding and Using Resource Files Passing values to another web page Re-size label text how to capture enter key without affrecting copy paste kcust keys max length for tooltip remove xml file root tag Debugging UserControl remove xml file namespace attribute |
|||||||||||||||||||||||