I am creating an XMLDocument
xsi prefix is missing from the schema location when I save the file
My input is :
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I want output like below
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but I am getting as
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I tried to check solution from google and found one thing in this link xsi missing from schemaLocation and type and I also tried included second parameter
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
and I am getting error "The ':' character, hexadecimal value 0x3A, cannot be included in a name"
Can anyone please help me out with this issue ...
	
		
			
		
		
	
				
			xsi prefix is missing from the schema location when I save the file
My input is :
			
				C#:
			
		
		
		XmlElement rootnode = xml.CreateElement("Package");
rootnode.SetAttribute("xmlns", "http://www/org/2007");
rootnode.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
rootnode.SetAttribute("xsi:schemaLocation", "http://www.org/schema/.xsd");I want output like below
			
				C#:
			
		
		
		<Package xmlns="http://www/org/2007" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.org/schema/.xsd">
			
				C#:
			
		
		
		<Package xmlns="http://www/org/2007" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://www.org/schema/.xsd">   (xsi prefix is missing)I tried to check solution from google and found one thing in this link xsi missing from schemaLocation and type and I also tried included second parameter
			
				C#:
			
		
		
		 rootnode.SetAttribute("xsi:schemaLocation", "http://www.w3.org/2001/XMLSchema-instance", "http://www.org/schema/.xsd");Can anyone please help me out with this issue ...
			
				Last edited by a moderator: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 
 
		