Editing Xml Schema

Xml schema is used when xml based communication is needed between different systems, the xml schema is used to describe the structure of an xml document.  In this tutorial, I will demonstrate how to edit an xml schema using Liquid XML Studio.
Working with Liquid XML Studio is very straightforward because of its design view feature which is user friendly, and very easy to use.
For this I am using Simple Book Store Project which has some default values, the output looks like this:

img1

The Schema Looks Like this :

img2

Now if Another Column is to be added (Distributor), you need to change the xml schema to make your xml document valid. Using Liquid Xml Studio, we can open the schema document, in the design view of the xml schema you can see the structure of xml document there you can do your changes by editing the nodes . To add another node you, follow below steps.

  • Right Click on the Schema Root
  • Select Add Child
  • Child Type is Complex Type in the Design view part of Liquid Xml Studio

img3

Name it as Distributor.

Distributor can have several attributes as distributor name, distributor city etc.

Let’s create few of them.

Let’s say the full name is coming from 2 different columns in the database so you can combine them in one node by using sequence which will concat the values and display it one string. Sequence can be used for other data types also.

To create a sequence you can use same procedure .Right Click on the node on which you need to create child sequence and under “Add Child” select sequence.

Now add child elements to the sequence like Distributor Name, Distributor Organization Name

After adding few fields it looks like this:

img5

Lets make Some changes in XSLT file so that it can be shown in the html page.

img6

And Html Page with some dummy values look like this:

img7

So by doing all the changes in xml schema we get this output:

img8

So by using Liquid XML Studio you can edit the XML schema and change the structure of the XML Document used in any communications.

XMLQuire – a free light XML Editor

 

This XML Editor is the result of a rethink on one of the very fundamental principles of the way we edit XML text, namely XML formatting.In this editor, no tab or space characters are used for XML indentation. Instead, the left-margin adjusts continuously to ensure the XML always appears properly formatted. The editing experience is quite different from normal, because as you edit XML, you will find that the XML reflows into new formatting patterns continuously, even
when the XML structure is altered significantly, there’s no ‘reformat’ button to press.

Features

  • Support for Windows XP or later
  • Syntax-highlighting and auto-completion
  • Schema validation and schema-aware completion lists
  • XPath Editor with auto-completion and full predicate/function tracing
  • DTD caching
  • Regex powered Find and Replace with preview
  • Special Print Preview with XML print formatting options
  • Recent Files list with preserved state replaces document tabs
  • Left-justified alternative view option
  • Multi-process and Multi-monitor editing windows
  • Smart trimming of formatted XML for import compatibility with existing editors
  • Synchronized element outline tree and sibling node value list

web-screen XMLQuire can be downloaded from http://xmlquire.com

How to fix delicious add-on for Firefox 4

Firefox 4 excellent and very fast browser, but many add-ons stopped working. One of them is delicious add-on. Of course is possible to use delicious bookmarklets, but it certainly can not replace all functionality that old delicious add-on has. With the help of a small change in one of the files – it will be possible to return the add-on back to the “life”.

First thing to do, in the windows explorer enter the following path:

%appdata%\Mozilla\Firefox\Profiles

Choose a folder that name ends with .default extension.Then go to extensions folder.

In the folder locate a directory with following GUID (represents delicious add-on)

{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}

Under GUID directory open install.rdf file in any text editor.

Find a line contains  em:maxVersion attribute .

Change attribute value to “4.0”.Save the file . Restart Firefox 4 .

Final file shown below

<?xml version="1.0"?>

  
  
    
  

A simple way to run C# code from bat file

I read an interested article demonstrated how to run a bat file with embedded C# code. I repost this example here, because the original post is written in Russian. Despite the fact that there are other more powerful solutions and frameworks to achieve the same goal (e.g. Powershell) – I think the way presented by the author, is very useful for different scenarios.


/*
@echo off && cls
set WinDirNet=%WinDir%\Microsoft.NET\Framework
IF EXIST "%WinDirNet%\v2.0.50727\csc.exe" set csc="%WinDirNet%\v2.0.50727\csc.exe"
IF EXIST "%WinDirNet%\v3.5\csc.exe" set csc="%WinDirNet%\v3.5\csc.exe"
IF EXIST "%WinDirNet%\v4.0.30319\csc.exe" set csc="%WinDirNet%\v4.0.30319\csc.exe"
%csc% /nologo /out:"%~0.exe" %0
"%~0.exe"
del "%~0.exe"
exit
*/

class HelloWorld
{

    static void Main()
    {
        System.Console.WriteLine("Hello, World!\r\nI am at " + System.Environment.Version);
        System.Console.ReadLine();
    }
}

How to get rid from annoying IE warning when you debug a Silverlight application

When you try to open a local file, Internet Explorer displays the following warning: "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer.Click here for options…".

ie-warning

You may run blocked file (application) by right click on the warning bar ,but doing this every time is very annoying. Especially when you debug Silverlight applications.  To disable the warning go to Tools->Internet Options and in opened dialog choose “Advanced”,then  check the fallowing option “Allow active content to run in files in My Computer*” as shown in the screenshot below.Then press “OK” and restart the browser .

 internet-options-disable

Note: This trick can be useful when you open local XML or JS file


Page 1 of 5912345...102030...Last »