I have XSD file (for example) http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd and I would like to use it for adding code autocomplete in my xml editor (I prefer Eclipse but any other free editor would be O.K.).
Is it possible? And if Yes, how can I do it?
In Visual Studio, open the File menu and select New > File. Or, use the Ctrl+N keyboard shortcut. In the New File dialog box, select XML Schema and then select Open. A new file is created.
The line above: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" tells the XML parser that this document should be validated against a schema. The line: xsi:noNamespaceSchemaLocation="shiporder. xsd" specifies WHERE the schema resides (here it is in the same folder as "shiporder. xml").
I had a similar problem but did not find a solution here so I posted a similar question. The answer led me to the Eclipse XML Editors and Tools plugin in Eclipse which supports autocomplete based on XML Schema.
Once the XML document is associated with the relevant XSD file, autocomplete should kick in automatically.
p.s. Considering the date of your question, you probably already found a suitable solution. However I thought I'd leave this answer anyway as a heads up to future visitors. HTH.
Using XML Schema for code autocomplete is supported in Visual Studio more details here.
Alternative XML editor is: Microsoft XML Notepad 2007 (personally I found this editor to be very unfriendly, is very visual but editing files is not very productive)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With