| | |
XML Schema Question
Please support our RSS, Web Services and SOAP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I have created a new XML file and schema that is used to run sql scripts but I am having a problem doing a few things. below is an example of what I am hoping to create.
XML file.
XML schema
The main problem I am having is I want the element that surrounds the parameter to
be parameter type name. So if the element is USERNAME and the value is pparker then I know that ppparker is a username and not a PAssword or string or whatever. But I have not been able to find how to do this with the xml schema.
I also would like to create the name field as a key or a unique, I have found a few examples of that but nothing that has worked for me. (I am validating the XML with C# validationReader)
Any help would be greatly appreciated.
XML file.
RSS, Web Services and SOAP Syntax (Toggle Plain Text)
<root> <script> <name> Script for Upgrading </name> <file> C:\Files\Scripts\Upgrade.sql </file> <SCHEMA> Schema Owner </SCHEMA> </script> <script> <name> Script for Removing Geometeries </name> <file> C:\Files\Scripts\replaceGeoms.sql </file> <SCHEMA> Schema Owner </SCHEMA> <USERNAME> Username </USERNAME> <PASSWORD> Password </PASSWORD> </script> <parameter_type>USERNAME</parameter_type> <parameter_type>SCHEMA</parameter_type> <parameter_type>PASSWORD</parameter_type> <parameter_type>NUMBER</parameter_type> <parameter_type>STRING</parameter_type> </root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="sqlscripts"
xmlns="sqlscripts" elementFormDefault="qualified">
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="script" type="script_type" maxOccurs="unbounded" />
<xsd:element name="parameter_type" type="xsd:string"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="script_type">
<xsd:sequence>
<xsd:element name="name" type="xsd:string" />
<xsd:element name="file" type="xsd:string" />
<xsd:element type="parameter_type" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>The main problem I am having is I want the element that surrounds the parameter to
be parameter type name. So if the element is USERNAME and the value is pparker then I know that ppparker is a username and not a PAssword or string or whatever. But I have not been able to find how to do this with the xml schema.
I also would like to create the name field as a key or a unique, I have found a few examples of that but nothing that has worked for me. (I am validating the XML with C# validationReader)
Any help would be greatly appreciated.
- mike mclennan
![]() |
Similar Threads
- [urgent] HTML form => XML file (JSP)
- Xml Case Sensitive (VB.NET)
- HTML display but xml content (HTML and CSS)
- Importing XML Schema. (ASP.NET)
- Append in xml document (C#)
- How to use xml? (HTML and CSS)
- Javascript, Form fields validation and submit (JavaScript / DHTML / AJAX)
- "how to": 2 questions: (Java)
- parsing error (XML file-java-schema) (Java)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: Parse SAML token
- Next Thread: XML Sections(?)
| Thread Tools | Search this Thread |
.htaccess 301 accept access alltop api authentication binarysecuritytoken blog card collaboration credit data development ebay email evernote flash google government highrise htaccess intel internet legal live netbeans patent paypal php podcast proxy redirect rss rssfeeds searchmonkey server service soap software swappingxmlfromflash swappingxmlnodes url web webservices webservicesecurity wiki wikipedia xerces xml xslt y!os yahoo ydn





