Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all 935 articles
Browse latest View live

Rename node, XSLT 1.0

$
0
0

Hello,

I have an XML like this:

<Temp_Node_A>data</Temp_Node_A>
<Temp_Node_B>data</Temp_Node_B>
... etc ...

I want it converted to

<Node_A>data</Node_A>
<Node_B>data</Node_B>
... etc ...

That is, I want to remove "Temp_" from every node that starts with Temp_ (or /Temp)

With XSLT 1.0, is it possible? If so, can you give an example?

Regards
Peter


xml Reading issue

$
0
0

Hi,

Below is the xml,

<?xml version="1.0" encoding="utf-8"?><UsersList><User><Name>sam&Tim</Name><Address>21, bills street, CA</Address><Issues>"Issues1", "Issues2"</Issues></User></UsersList>

C#:


                string xml = System.IO.File.ReadAllText(@"E:\Sample.xml");
                xml = System.Text.RegularExpressions.Regex.Replace(xml, "<(?![_:a-z][-._:a-z0-9]*\b[^<>]*>)", "&lt;");

                XDocument doc = XDocument.Parse(xml);
i need to convert the special charecters (<,>,",',&) and i am using the above regex. but parse method throws an error. any help please how to resolve the issue


loving dotnet

Powershell - Read XML with multiple nodes - missing nested multiple nodes

$
0
0

I have this following XML file that is read with the Powershell script below. It reads all the elements to the screen except for the nested Filename:

param([string] $xmlFilePath=’P:\TestFileNamesT6.xml’)
[xml] $xmlContent = [xml] (Get-Content -Path $xmlFilePath)
# the next line is missing in 99% of all examples I have seen
[System.Xml.XmlElement] $root = $xmlContent.get_DocumentElement()
# notice the corresponding change in the next line
[System.Xml.XmlElement] $FileGroups = $root.FileGroups
[System.Xml.XmlElement] $FileGroup = $null
Clear-Host
foreach($FileGroup in $Filegroups.ChildNodes)
{
[string] $FileGroupName = $FileGroup.FileGroupName
[string] $DriveName = $FileGroup.DriveName
[string] $Path = $FileGroup.Path
    foreach($Filename in $Filenames.ChildNodes)
    {
    [string] $Filename = $FileGroup.Filename
    Write-Host (“FileGroupName={0},DriveName={1},Path={2},Filename={3}” -f $FileGroupName,$DriveName,$Path,$Filename)
    }
    Write-Host (“FileGroupName={0},DriveName={1},Path={2},Filename={3}” -f $FileGroupName,$DriveName,$Path,$Filename)
}

Output:

FileGroupName=Group1,DriveName=M:,Path=\\Host1.Share1.net\Group1,Filename=
FileGroupName=Group2,DriveName=T:,Path=\\Host1.Share2.net\Group2,Filename=
FileGroupName=Group3,DriveName=T:,Path=\\Host1.Share3.net\Group3,Filename=
FileGroupName=Group4,DriveName=S:,Path=\\Host1.Share4.net\Group4,Filename=
FileGroupName=Group5,DriveName=X:,Path=\\Host1.Share5.net\Group5,Filename=
FileGroupName=Group6,DriveName=U:,Path=\\Host2.Share6.net\Group6,Filename=
FileGroupName=Group7,DriveName=Y:,Path=\\Host2.Share7.net\Group7,Filename=
FileGroupName=Group8,DriveName=Z:,Path=\\Host3.Share8.net\Group8,Filename=
PS P:\> 

<?xml version="1.0" ?> 
<Root>
<FileGroups>
<FileGroup>
<FileGroupName>Group1</FileGroupName>
<DriveName>M:</DriveName>
<Path>\\Host1.Share1.net\Group1</Path>
<Filenames>
<Filename>File1.dat</Filename>
<Filename>File2.dat</Filename>
<Filename>File3.dat</Filename>
</Filenames>
</FileGroup>
<FileGroup>
<FileGroupName>Group2</FileGroupName>
<DriveName>T:</DriveName>
<Path>\\Host1.Share2.net\Group2</Path>
<FileNames>
<Filename>File4.csv</Filename>
<Filename>File5.csv</Filename>
<Filename>File6.csv</Filename>
</FileNames>
</FileGroup>
<FileGroup>
<FileGroupName>Group3</FileGroupName>
<DriveName>T:</DriveName>
<Path>\\Host1.Share3.net\Group3</Path>
<FileNames>
<Filename>File7.txt</Filename>
<Filename>File8.txt</Filename>
<Filename>File9.txt</Filename>
</FileNames>
</FileGroup>
<FileGroup>
<FileGroupName>Group4</FileGroupName>
<DriveName>S:</DriveName>
<Path>\\Host1.Share4.net\Group4</Path>
<Filenames>
<Filename>File10.dat</Filename>
<Filename>File10.dat.ok</Filename>
<Filename>File11.dat</Filename>
<Filename>File12.dat.ok</Filename>
</Filenames>
</FileGroup>
<FileGroup>
<FileGroupName>Group5</FileGroupName>
<DriveName>X:</DriveName>
<Path>\\Host1.Share5.net\Group5</Path>
<Filenames>
<Filename>File13.txt</Filename>
<Filename>File14.txt</Filename>
<Filename>File15.txt</Filename>
</Filenames>
</FileGroup>
<FileGroup>
<FileGroupName>Group6</FileGroupName>
<DriveName>U:</DriveName>
<Path>\\Host2.Share6.net\Group6</Path>
<Filenames>
<Filename>File16.csv</Filename>
<Filename>File17.csv</Filename>
<Filename>File18.csv</Filename>
</Filenames>
</FileGroup>
<FileGroup>
<FileGroupName>Group7</FileGroupName>
<DriveName>Y:</DriveName>
<Path>\\Host2.Share7.net\Group7</Path>
<Filenames>
<Filename>File19.dat</Filename>
<Filename>File19.dat.ok</Filename>
<Filename>File20.dat</Filename>
<Filename>File21.dat.ok</Filename>
</Filenames>
</FileGroup>
<FileGroup>
<FileGroupName>Group8</FileGroupName>
<DriveName>Z:</DriveName>
<Path>\\Host3.Share8.net\Group8</Path>
<Filenames>
<Filename>File22.dat</Filename>
<Filename>File22.dat.ok</Filename>
</Filenames>
</FileGroup>
</FileGroups>
</Root>

How to create a multi-level XML file

$
0
0

VBScript:
CreateObject("Msxml2.DOMDocument"), How can I get the result like:

<?xml version="1.0"?>
<HOWTOS>
    <TOPIC>
          <Language>
               <TITLE>Java</TITLE>
          </Language>
    </TOPIC>

</HOWTOS>


how to XMLDOM createElement("Record index="1")

$
0
0

XMLDOM

how to  createElement("Record index="1")

Find specific XML Nodes in httpwebresponse

$
0
0

Hello Guys,

http://s000.tinyupload.com/?file_id=07672783697545510627

I want to loop through the attached Httpwebresponse document to find below mentioned nodes in each <d:element/> node.

<d:Key>DocId</d:Key><d:Value>191713063</d:Value>

This is what i have tried so far. looking for efficient way to do this. Probably LINQ???

This is what i have tried so far:

XmlNamespaceManager nsmgr1 = new XmlNamespaceManager(ResultXML.NameTable);
            nsmgr1.AddNamespace("d", "http://schemas.microsoft.com/ado/2007/08/dataservices");

            XmlNodeList nodeList;
            XmlElement root = ResultXML.DocumentElement;
            nodeList = root.SelectNodes("//d:Rows", nsmgr1);
            foreach (XmlNode isbn in nodeList)
            {
                foreach (XmlNode childNode in isbn.ChildNodes)
                {
                    nodeList = childNode.SelectNodes("//d:element", nsmgr1);

                }

            }

Regards,


Thanks, Nilesh

schemaLocation problem with Serialization.

$
0
0
I am using serialization in c# 3.0 (trying to serialize).  I want to use the schemaLocation xml attribute as that is what is in an example i need to stick to. I cannot work out what c# attribute i need to use to do this.

I have tried:

Code Snippet

public Class exampleClass
{
        [System.Xml.Serialization.XmlAttributeAttribute("schemaLocation", Namespace = "http://www.rewerse.net/I1/2006/R2ML http://oxygen.informatik.tu-cottbus.de/R2ML/0.4/R2ML.xsd")]
        public string schemaLocation;
}



where "exampleClass" is the root node in the serialized document.

The output should be like:

Code Snippet

<exampleClass schemaLocation="http://oxygen.informatik.tu-cottbus.de/R2ML/0.4/R2ML.xsd">
     ...
</exampleClass>


what comes out is more like:

Code Snippet

<exampleClass xmlns="http://oxygen.informatik.tu-cottbus.de/R2ML/0.4/R2ML.xsd">
     ...
</exampleClass>





xsd.exe and attribute group

$
0
0

Hello, 

I have a problem, maybe it is a duplicate, in this case my apologies.

I have a xsd like this:

<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:pi="TestNested" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="TestNested"><xs:attributeGroup name="LL"><xs:attribute name="LL_A" use="required"><xs:simpleType><xs:restriction base="xs:string"></xs:restriction></xs:simpleType></xs:attribute></xs:attributeGroup><xs:attributeGroup name="AG"><xs:attribute name="AG_A" use="required"><xs:simpleType><xs:restriction base="xs:string"></xs:restriction></xs:simpleType></xs:attribute><xs:attributeGroup ref="pi:LL" /></xs:attributeGroup><xs:element name="E"><xs:complexType><xs:attributeGroup ref="pi:AG"/></xs:complexType></xs:element></xs:schema>

When I try to create a class with xsd test.xsd /c /l:vb, it generates a class like this:

<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0"),  _
 System.SerializableAttribute(),  _
 System.Diagnostics.DebuggerStepThroughAttribute(),  _
 System.ComponentModel.DesignerCategoryAttribute("code"),  _
 System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true, [Namespace]:="TestNested"),  _
 System.Xml.Serialization.XmlRootAttribute([Namespace]:="TestNested", IsNullable:=false)>  _
Partial Public Class E

    Private aG_AField As String

    '''<remarks/><System.Xml.Serialization.XmlAttributeAttribute()>  _
    Public Property AG_A() As String
        Get
            Return Me.aG_AField
        End Get
        Set
            Me.aG_AField = value
        End Set
    End Property
End Class

As you can see there is no reference to LL_A attribute, how can I solve this?

Thank you,

Antonino Perricone



Unable to debug xsl in Visual Studio 2015RC Community

$
0
0

Hope someone can help,

The options to either debug/start/stop an xsl file are greyed out in the xml editor toolbar - I was following this approach Walkthrough: Debug an XSLT Style Sheet. This works fine in vs2013 community.

Update - also the xml menu only contains Create Schema (greyed out) and Schemas...

Is this a known issue in vs2015RC?

Edit - just reinstalled VS and the problem still persists. Anyone else seeing this issue?

Thank you



Problem using XmlTextWriter export to excel

$
0
0

Hi everybody,

   Having problem getting the desired result of xml file. Can you guys help me with this? The function is exporting data from database to an excel file, and then importing the changes in
data back to database. Thanks in advanced.


Current Code:
[code]

const string sheet = "urn:schemas-microsoft-com:office:spreadsheet", office = "urn:schemas-microsoft-com:office:office", excel = "urn:schemas-microsoft-com:office:excel";
     XmlTextWriter xmlTextWriter = new XmlTextWriter(filePath, System.Text.Encoding.Default);
     xmlTextWriter.Formatting = Formatting.Indented;
     xmlTextWriter.WriteStartDocument();
     xmlTextWriter.WriteProcessingInstruction("mso-application", "progid=\"Excel.Sheet\"");
     xmlTextWriter.WriteStartElement(string.Empty, "Workbook", sheet);
     xmlTextWriter.WriteAttributeString("xmlns", "o", "http://www.w3.org/2000/xmlns/", office);
     xmlTextWriter.WriteAttributeString("xmlns", "x", "http://www.w3.org/2000/xmlns/", excel);

     xmlTextWriter.WriteStartElement(string.Empty, "DocumentProperties", office);
     xmlTextWriter.WriteElementString("Author", "Somebody");
     xmlTextWriter.WriteEndElement();//End DocumentProperties

     xmlTextWriter.WriteStartElement(string.Empty, "ExcelWorkbook", excel);     
     xmlTextWriter.WriteElementString("WindowHeight", "10230");
     xmlTextWriter.WriteElementString("WindowWidth", "13275");
     xmlTextWriter.WriteElementString("WindowTopX", "480");
     xmlTextWriter.WriteElementString("WindowTopY", "75");
     xmlTextWriter.WriteElementString("ProtectStructure", "False");
     xmlTextWriter.WriteElementString("ProtectWindows", "False");
     xmlTextWriter.WriteEndElement();//End ExcelWorkbook

     xmlTextWriter.WriteStartElement("Styles", sheet);
     xmlTextWriter.WriteStartElement(string.Empty, "Style", sheet);
     xmlTextWriter.WriteAttributeString("ID", sheet, "Default");
     xmlTextWriter.WriteAttributeString("Name", "ss", "Normal");
     xmlTextWriter.WriteStartElement("Alignment", sheet);     
     xmlTextWriter.WriteAttributeString("Vertical", "ss", "Bottom");
     xmlTextWriter.WriteEndElement();//End Alignment
     xmlTextWriter.WriteStartElement("Font", sheet);
     xmlTextWriter.WriteEndElement();//End Font
     xmlTextWriter.WriteStartElement("Interior", sheet);
     xmlTextWriter.WriteEndElement();//End Interior
     xmlTextWriter.WriteStartElement("NumberFormat", sheet);
     xmlTextWriter.WriteEndElement();//End NumberFormat
     xmlTextWriter.WriteStartElement("Protection", sheet);
     xmlTextWriter.WriteEndElement();//End Protection    
     xmlTextWriter.WriteEndElement();//End Style
     xmlTextWriter.WriteEndElement();//End Styles

     xmlTextWriter.WriteStartElement(string.Empty,"WorkSheet", sheet);
     xmlTextWriter.WriteAttributeString(string.Empty,"Name", sheet, "Sheet1");

     xmlTextWriter.WriteStartElement(string.Empty, "Table", sheet);
     xmlTextWriter.WriteAttributeString("ExpandedColumnCount", "1");
     xmlTextWriter.WriteAttributeString("ExpandedRowcount", "1");
     xmlTextWriter.WriteAttributeString("TotalColumns", "3");
     xmlTextWriter.WriteAttributeString("TotalRows", "1");//To be modified

     //xmlTextWriter.WriteStartElement(string.Empty, "Column", sheet);
     //xmlTextWriter.WriteAttributeString("ss", "Index", sheet, "1");
     //xmlTextWriter.WriteAttributeString("ss", "AutoFitWidth", sheet, "0");
     //xmlTextWriter.WriteAttributeString("ss", "Width", sheet, "82.5");
     //xmlTextWriter.WriteEndElement();//End Column    

     xmlTextWriter.WriteStartElement("Row", sheet);
     
     xmlTextWriter.WriteStartElement("Cell", sheet);
     //xmlTextWriter.WriteStartElement(string.Empty, "Data", sheet);     
     //xmlTextWriter.WriteElementString("Data","ID");
     xmlTextWriter.WriteRaw("<Data ss:Type=\"String\">ID</Data>");
     //xmlTextWriter.WriteAttributeString("ss", "Type", sheet, "String");
     //xmlTextWriter.WriteEndElement();//End Data    
     xmlTextWriter.WriteEndElement();//End Cell 

     xmlTextWriter.WriteStartElement("Cell", sheet);
     //xmlTextWriter.WriteStartElement(string.Empty, "Data", sheet);
     //xmlTextWriter.WriteElementString("Data", "Name");
     xmlTextWriter.WriteRaw("<Data ss:Type=\"String\">Name</Data>");
     //xmlTextWriter.WriteAttributeString("ss", "Type", sheet, "String");
     //xmlTextWriter.WriteEndElement();//End Data    
     xmlTextWriter.WriteEndElement();//End Cell   

     xmlTextWriter.WriteEndElement();//End Row    

     xmlTextWriter.WriteStartElement("Row", sheet);
     xmlTextWriter.WriteStartElement("Cell", sheet);
     //xmlTextWriter.WriteStartElement(string.Empty, "Data", sheet);
     //xmlTextWriter.WriteElementString(string.Empty, "Data", excel, "1");
     xmlTextWriter.WriteRaw("<Data ss:Type=\"Number\">1</Data>");
     //xmlTextWriter.WriteAttributeString("ss", "Type", sheet, "Number");
     //xmlTextWriter.WriteEndElement();//End Data    
     xmlTextWriter.WriteEndElement();//End Cell 
     xmlTextWriter.WriteStartElement("Cell", sheet);
     //xmlTextWriter.WriteStartElement(string.Empty, "Data", sheet);
     //xmlTextWriter.WriteElementString(string.Empty, "Data", excel, "Sample");
     xmlTextWriter.WriteRaw("<Data ss:Type=\"String\">Sample</Data>");
     //xmlTextWriter.WriteAttributeString("ss", "Type", sheet, "String");
     //xmlTextWriter.WriteEndElement();//End Data    
     xmlTextWriter.WriteEndElement();//End Cell   
     xmlTextWriter.WriteEndElement();//End Row    

 

     xmlTextWriter.WriteEndElement();//End Table    

     xmlTextWriter.WriteStartElement(string.Empty, "WorksheetOptions", excel);
     xmlTextWriter.WriteStartElement("Selected", excel);
     xmlTextWriter.WriteEndElement();//End Selected    
     xmlTextWriter.WriteStartElement("Panes", excel);
     xmlTextWriter.WriteStartElement("Pane", excel);     
     xmlTextWriter.WriteElementString("Number", "3");//To be modified
     xmlTextWriter.WriteElementString("ActiveRow", "3");//To be modified
     xmlTextWriter.WriteElementString("ActiveCol", "3");//To be modified

     xmlTextWriter.WriteEndElement();//End Pane    
     xmlTextWriter.WriteEndElement();//End Panes    
     xmlTextWriter.WriteElementString("ProtectObjects", "False");//To be modified
     xmlTextWriter.WriteElementString("ProtectScenarios", "False");//To be modified
     xmlTextWriter.WriteEndElement();//End WorksheetOptions    
     xmlTextWriter.WriteEndElement();//End WorkSheet 
     xmlTextWriter.WriteEndElement();//End Workbook

     xmlTextWriter.WriteEndDocument();
     xmlTextWriter.Close();
[code]

 

Desired XML Result:

<?xml version="1.0"?>
<?mso-application progid='Excel.Sheet'?>
<Workbook xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"> 
<Worksheet ss:Name="Sheet1">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  <Version>11.8107</Version>
 </DocumentProperties>
 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>10005</WindowHeight>
  <WindowWidth>10005</WindowWidth>
  <WindowTopX>120</WindowTopX>
  <WindowTopY>135</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
 </Styles>
  <Table ss:ExpandedColumnCount="4" ss:ExpandedRowCount="4" x:FullColumns="1"
   x:FullRows="1">
   <Column ss:Index="3" ss:AutoFitWidth="0" ss:Width="82.5"/>
   <Row>
    <Cell><Data ss:Type="String">ID</Data></Cell>
    <Cell><Data ss:Type="String">Name</Data></Cell>
    <Cell><Data ss:Type="String">Name in Chinese</Data></Cell>
    <Cell><Data ss:Type="String">Name in Chinese</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="Number">1</Data></Cell>
    <Cell><Data ss:Type="String">gg</Data></Cell>
    <Cell ss:Index="4"><Data ss:Type="Boolean">1</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">ss</Data></Cell>
    <Cell><Data ss:Type="String">s</Data></Cell>
    <Cell><Data ss:Type="Boolean">0</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="Number">3</Data></Cell>
    <Cell><Data ss:Type="String">ss</Data></Cell>
    <Cell><Data ss:Type="String">s</Data></Cell>
   </Row>
  </Table>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <Selected/>
   <Panes>
    <Pane>
     <Number>3</Number>
     <ActiveRow>3</ActiveRow>
     <ActiveCol>6</ActiveCol>
    </Pane>
   </Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions> 
 </Worksheet>
</Workbook>


Actual XML File Result:

<?xml version="1.0" encoding="Windows-1252"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="urn:schemas-microsoft-com:office:spreadsheet">
  <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    <Author>Somebody</Author>
  </DocumentProperties>
  <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
    <WindowHeight>10230</WindowHeight>
    <WindowWidth>13275</WindowWidth>
    <WindowTopX>480</WindowTopX>
    <WindowTopY>75</WindowTopY>
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
  </ExcelWorkbook>
  <Styles>
    <Style d3p1:ID="Default" d3p2:Name="Normal" xmlns:d3p2="ss" xmlns:d3p1="urn:schemas-microsoft-com:office:spreadsheet">
      <d3p1:Alignment d3p2:Vertical="Bottom" />
      <d3p1:Font />
      <d3p1:Interior />
      <d3p1:NumberFormat />
      <d3p1:Protection />
    </Style>
  </Styles>
  <WorkSheet d2p1:Name="Sheet1" xmlns:d2p1="urn:schemas-microsoft-com:office:spreadsheet">
    <Table ExpandedColumnCount="1" ExpandedRowcount="1" TotalColumns="3" TotalRows="1">
      <d2p1:Row>
        <d2p1:Cell><Data ss:Type="String">ID</Data></d2p1:Cell>
        <d2p1:Cell><Data ss:Type="String">Name</Data></d2p1:Cell>
      </d2p1:Row>
      <d2p1:Row>
        <d2p1:Cell><Data ss:Type="Number">1</Data></d2p1:Cell>
        <d2p1:Cell><Data ss:Type="String">Sample</Data></d2p1:Cell>
      </d2p1:Row>
    </Table>
    <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
      <x:Selected />
      <x:Panes>
        <x:Pane>
          <Number>3</Number>
          <ActiveRow>3</ActiveRow>
          <ActiveCol>3</ActiveCol>
        </x:Pane>
      </x:Panes>
      <ProtectObjects>False</ProtectObjects>
      <ProtectScenarios>False</ProtectScenarios>
    </WorksheetOptions>
  </WorkSheet>
</Workbook>

MSXML2 error on Windows 8 with Visual Studio 2010

$
0
0

Hi,

On compiling my project in Visual Studio 2010 on Windows 8, it gives the following MSXML errors:

error C2065: 'DOMDocument60' : undeclared identifier     ..\somepath\myfile1.cpp

error C2039: 'DOMDocument60' : is not a member of 'MSXML2'     ..\somepath\myfile2.cpp

This is legacy code, so I'm not sure if something else is needed to be done, especially on Windows 8. The same code compiles on Windows 7. Appreciate any help.

TIA,

Jy

XML saved as xls

$
0
0

Can someone show me the steps, including references and namespaces required, to open an XML file and save it as an Excel spreadsheet WITH AN .XLS extension programatically using VB.net (VS 2003)?

The XML file I created is very large. If I manually open the XML file it opens in Excel but takes a very long time to do so. If I then save that file as an .xls file it saves everything but the overhead is considerable reduced so the resulting file is considerably smaller. How can I do this programatically?

Thank you.

Unable to parse CSDL

$
0
0

I'm using CsdlReader in C# to parse a csdl. Part of the XML file is as follows:

<AssociationName=\"Medalists_Medals_Medals_Medal_ID\"><EndRole=\"Medalists_Medal_ID\"Type=\"Sandbox.Medalists\"Multiplicity=\"*\"/><EndRole=\"Medals_Medal_ID\"Type=\"Sandbox.Medals\"Multiplicity=\"0..1\"/></Association>

And this is my code:

CsdlReader.TryParse(schemaReaders,out edmModel,out edmErrors)

As you can see. Role is an attribute of End. However, it seems that I am unable to parse that XML. And I have errors like this in edmErrors:

{MissingAttribute : Required schema attribute 'Role' is not present on element 'End'. : (0, 0)}

The message tells me that Role is missing, but I do have that in my csdl.

Startindex cannot be less than zero when trying to create a sample xml file from a xsd file

$
0
0

Using Visual studio pro 2015

I have a xsd file and need to generate a xml sample file from it.
Ive opened the file with the XML editor. When i Try to "Generate Sample XML", I'm met with the following:

Have anyone experienced this?

Any hints or tips on how to find the fault are welcome!

brgs

Bjørn

List error: "List datatype must be derived from an atomic datatype"

$
0
0

I've read that List and Union are not well supported in MSXML and I'm finding this issue perplexing beyond my ability to resolve it and would appreciate some help. I've tried every permutation of simpleTypes, ID/IDREFS, key/keyref, and anonymous types to resolve this issue to no avail. The straightforward, anonymous XSD config is shown below but it throws the subject error upon Schema load in MSXML2 in Excel 2013.

The Goal is to restrict element SOURCEList to {1,4} valid occurrences of SOURCE/NAME in the instance document. The pattern restriction, I believe, satisfies the atomic datatype requirement for SOURCE/NAME but MSXML disagrees and throws the error.

The W3C example builds a list based on an XSD enumeration which is a different scenario. What is really odd is that other (non MSXML) validators work fine but the target environment is native MSXML in Excel without 3rd party parsers. sigh...

XSD:

<xs:complexType name="SOURCEType" mixed="true"><xs:sequence><xs:element name="NAME"><xs:simpleType><xs:restriction base="xs:ID"><xs:pattern value="[A-Z]([A-Z0-9;&#32;&#45;]){1,8}"/></xs:restriction></xs:simpleType></xs:element><!-- other elements --></xs:sequence></xs:complexType>  <xs:element name="SOURCELIST"><xs:simpleType><xs:restriction><xs:simpleType><xs:list><xs:simpleType><xs:restriction base="xs:IDREFS"/></xs:simpleType></xs:list></xs:simpleType><xs:minLength value="1"/><xs:maxLength value="4"/></xs:restriction></xs:simpleType></xs:element>

XML:

<!-- data origin elements --><ela:SOURCE><ela:NAME>GEN-1</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>GEN-2</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>GEN-3</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>GEN-4</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>EP1A</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>EP1B</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>EP2A</ela:NAME></ela:SOURCE><ela:SOURCE><ela:NAME>EP2B</ela:NAME></ela:SOURCE><!-- data receiving elements --><ela:MODE><ela:SOURCELIST>GEN-1 GEN-2 GEN-3 GEN-4</ela:SOURCELIST></ela:MODE><ela:MODE><ela:SOURCELIST>EP1A EP1B EP2A EP2B</ela:SOURCELIST></ela:MODE><ela:MODE><ela:SOURCELIST>EP1A</ela:SOURCELIST></ela:MODE>


How does XSL process

$
0
0

I'm new to XSL and having difficulty in understanding how/when patterns match/process. I understand that it is declarative, not procedural, and am at the disadvantage of trying to process XML -> XML, not XML -> HTML (which is what all the tutorials appear to show). In essence I want to sort a subtree of my XML file (which is a Visual studio document). In the subtree I want to sort the sibilngs by an attribute. A truncated sample of the file is:

<?xml version="1.0"?><SqlWorkbenchSqlProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="PMISQL"><Items><LogicalFolder Name="Connections" Type="2" Sorted="true"><Items><ConnectionNode Name="cerberus:XPOOLE\alistair.moreton"><Created>2013-06-28T15:50:27.919788+01:00</Created><Type>SQL</Type><Server>cerberus</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB>master</InitialDB><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode><ConnectionNode Name="hector:XPOOLE\alistair.moreton"><Created>2013-07-02T15:27:02.5793203+01:00</Created><Type>SQL</Type><Server>hector</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB /><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode></Items></LogicalFolder><LogicalFolder Name="Queries" Type="0" Sorted="true"><Items><FileNode Name="PMI001_AddressHistory.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI001_AddressHistory.sql</FullPath></FileNode><FileNode Name="PMI000_DataWarehouseState.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:hector:True</AssociatedConnectionMoniker><AssociatedConnSrvName>hector</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI000_DataWarehouseState.sql</FullPath></FileNode><FileNode Name="PMI003_PlannedAdmissions.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI003_PlannedAdmissions.sql</FullPath></FileNode><FileNode Name="PMI004_AllActivity.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI004_AllActivity.sql</FullPath></FileNode><FileNode Name="PMI002_ClinicCodes.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI002_ClinicCodes.sql</FullPath></FileNode></Items></LogicalFolder><LogicalFolder Name="Miscellaneous" Type="3" Sorted="true"><Items /></LogicalFolder></Items><SccProjectName>$/DataWarehouse/Dev/Reports/PMI</SccProjectName><SccAuxPath /><SccLocalPath>.</SccLocalPath><SccProvider>MSSCCI:Team Foundation Server MSSCCI Provider</SccProvider></SqlWorkbenchSqlProject>

and the XSL file I'm applying is:

<?xml version="1.0" encoding="iso-8859-1"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/"><xsl:copy-of select="."/><xsl:apply-templates/></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Connections']"><xsl:copy-of select="."/></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Queries']"><xsl:copy-of select="."/></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Queries']/Items"><xsl:for-each select="./FileNode"><xsl:sort select="@Name" data-type="text" case-order="upper-first"/><xsl:copy-of select="."/></xsl:for-each></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Miscellaneous']"><xsl:copy-of select="."/></xsl:template></xsl:stylesheet>

I want to sort the FileNode siblings in /SqlWorkbenchSqlProject/Items/LogicalFolder where Name="Queries" by their @Name attribute, but I want the rest of the file to be output as it is.

If I run the transform above, I get additional junk at the end of the file, i.e.:

<?xml version="1.0" encoding="utf-8"?><SqlWorkbenchSqlProject Name="PMISQL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Items><LogicalFolder Name="Connections" Type="2" Sorted="true"><Items><ConnectionNode Name="cerberus:XPOOLE\alistair.moreton"><Created>2013-06-28T15:50:27.919788+01:00</Created><Type>SQL</Type><Server>cerberus</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB>master</InitialDB><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode><ConnectionNode Name="hector:XPOOLE\alistair.moreton"><Created>2013-07-02T15:27:02.5793203+01:00</Created><Type>SQL</Type><Server>hector</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB /><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode></Items></LogicalFolder><LogicalFolder Name="Queries" Type="0" Sorted="true"><Items><FileNode Name="PMI001_AddressHistory.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI001_AddressHistory.sql</FullPath></FileNode><FileNode Name="PMI000_DataWarehouseState.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:hector:True</AssociatedConnectionMoniker><AssociatedConnSrvName>hector</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI000_DataWarehouseState.sql</FullPath></FileNode><FileNode Name="PMI003_PlannedAdmissions.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI003_PlannedAdmissions.sql</FullPath></FileNode><FileNode Name="PMI004_AllActivity.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI004_AllActivity.sql</FullPath></FileNode><FileNode Name="PMI002_ClinicCodes.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI002_ClinicCodes.sql</FullPath></FileNode></Items></LogicalFolder><LogicalFolder Name="Miscellaneous" Type="3" Sorted="true"><Items /></LogicalFolder></Items><SccProjectName>$/DataWarehouse/Dev/Reports/PMI</SccProjectName><SccAuxPath /><SccLocalPath>.</SccLocalPath><SccProvider>MSSCCI:Team Foundation Server MSSCCI Provider</SccProvider></SqlWorkbenchSqlProject>




          2013-06-28T15:50:27.919788+01:00
          SQL
          cerberus

          Windows Authentication
          master
          15
          0
          NotSpecified
          Microsoft SQL Server Management Studio - Query


          2013-07-02T15:27:02.5793203+01:00
          SQL
          hector

          Windows Authentication

          15
          0
          NotSpecified
          Microsoft SQL Server Management Studio - Query






          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI001_AddressHistory.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:hector:True
          hector

          PMI000_DataWarehouseState.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI003_PlannedAdmissions.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI004_AllActivity.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI002_ClinicCodes.sql







  $/DataWarehouse/Dev/Reports/PMI

  .
  MSSCCI:Team Foundation Server MSSCCI Provider

So:

(a) any idea how I modify the transform to achieve my aim and why, and

(b) where is the junk coming from. I have no XSL nodes that are xsl:value-of, so why are values being output for nodes that have already been processed, and (yes, and),

(c) in general, if I want to generate as output, the input file, except for a subtree that I want to treat differently, how do I go about this?

Any help will be very much appreciated. If I'm in the wrong forum, please point me in the right direction. The Visual Studio forums I've posted in before appear to no longer be.

Many thanks,

Mark


Change Size With GPO of Temporary Internet Files IE 11

$
0
0
I'm looking to change the default settings of IE 11 for Temporary Internet Files

I need to do this with a GPO on a Windows Server 2012 R2

Do you have any ideas?

Thanks for the help

Sorting XML -> XML using XSL

$
0
0

I'm new to XSL and having difficulty in understanding how/when patterns match/process. I understand that it is declarative, not procedural, and am at the disadvantage of trying to process XML -> XML, not XML -> HTML (which is what all the tutorials appear to show). In essence I want to sort a subtree of my XML file (which is a Visual studio document - annoying it doesn't sort the files when added which is really bugging my team). In the subtree I want to sort the sibilngs by an attribute. A truncated sample of the file is:

<?xml version="1.0"?><SqlWorkbenchSqlProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="PMISQL"><Items><LogicalFolder Name="Connections" Type="2" Sorted="true"><Items><ConnectionNode Name="cerberus:XPOOLE\alistair.moreton"><Created>2013-06-28T15:50:27.919788+01:00</Created><Type>SQL</Type><Server>cerberus</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB>master</InitialDB><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode><ConnectionNode Name="hector:XPOOLE\alistair.moreton"><Created>2013-07-02T15:27:02.5793203+01:00</Created><Type>SQL</Type><Server>hector</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB /><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode></Items></LogicalFolder><LogicalFolder Name="Queries" Type="0" Sorted="true"><Items><FileNode Name="PMI001_AddressHistory.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI001_AddressHistory.sql</FullPath></FileNode><FileNode Name="PMI000_DataWarehouseState.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:hector:True</AssociatedConnectionMoniker><AssociatedConnSrvName>hector</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI000_DataWarehouseState.sql</FullPath></FileNode><FileNode Name="PMI003_PlannedAdmissions.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI003_PlannedAdmissions.sql</FullPath></FileNode><FileNode Name="PMI004_AllActivity.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI004_AllActivity.sql</FullPath></FileNode><FileNode Name="PMI002_ClinicCodes.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI002_ClinicCodes.sql</FullPath></FileNode></Items></LogicalFolder><LogicalFolder Name="Miscellaneous" Type="3" Sorted="true"><Items /></LogicalFolder></Items><SccProjectName>$/DataWarehouse/Dev/Reports/PMI</SccProjectName><SccAuxPath /><SccLocalPath>.</SccLocalPath><SccProvider>MSSCCI:Team Foundation Server MSSCCI Provider</SccProvider></SqlWorkbenchSqlProject>

and the XSL file I'm applying is:

<?xml version="1.0" encoding="iso-8859-1"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/"><xsl:copy-of select="."/><xsl:apply-templates/></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Connections']"><xsl:copy-of select="."/></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Queries']"><xsl:copy-of select="."/></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Queries']/Items"><xsl:for-each select="./FileNode"><xsl:sort select="@Name" data-type="text" case-order="upper-first"/><xsl:copy-of select="."/></xsl:for-each></xsl:template><xsl:template match="/SqlWorkbenchSqlProject/Items/LogicalFolder[Name='Miscellaneous']"><xsl:copy-of select="."/></xsl:template></xsl:stylesheet>

I want to sort the FileNode siblings in /SqlWorkbenchSqlProject/Items/LogicalFolder where Name="Queries" by their @Name attribute, but I want the rest of the file to be output as it is.

If I run the transform above, I get additional junk at the end of the file, i.e.:

<?xml version="1.0" encoding="utf-8"?><SqlWorkbenchSqlProject Name="PMISQL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Items><LogicalFolder Name="Connections" Type="2" Sorted="true"><Items><ConnectionNode Name="cerberus:XPOOLE\alistair.moreton"><Created>2013-06-28T15:50:27.919788+01:00</Created><Type>SQL</Type><Server>cerberus</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB>master</InitialDB><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode><ConnectionNode Name="hector:XPOOLE\alistair.moreton"><Created>2013-07-02T15:27:02.5793203+01:00</Created><Type>SQL</Type><Server>hector</Server><UserName /><Authentication>Windows Authentication</Authentication><InitialDB /><LoginTimeout>15</LoginTimeout><ExecutionTimeout>0</ExecutionTimeout><ConnectionProtocol>NotSpecified</ConnectionProtocol><ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName></ConnectionNode></Items></LogicalFolder><LogicalFolder Name="Queries" Type="0" Sorted="true"><Items><FileNode Name="PMI001_AddressHistory.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI001_AddressHistory.sql</FullPath></FileNode><FileNode Name="PMI000_DataWarehouseState.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:hector:True</AssociatedConnectionMoniker><AssociatedConnSrvName>hector</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI000_DataWarehouseState.sql</FullPath></FileNode><FileNode Name="PMI003_PlannedAdmissions.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI003_PlannedAdmissions.sql</FullPath></FileNode><FileNode Name="PMI004_AllActivity.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI004_AllActivity.sql</FullPath></FileNode><FileNode Name="PMI002_ClinicCodes.sql"><AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True</AssociatedConnectionMoniker><AssociatedConnSrvName>cerberus</AssociatedConnSrvName><AssociatedConnUserName /><FullPath>PMI002_ClinicCodes.sql</FullPath></FileNode></Items></LogicalFolder><LogicalFolder Name="Miscellaneous" Type="3" Sorted="true"><Items /></LogicalFolder></Items><SccProjectName>$/DataWarehouse/Dev/Reports/PMI</SccProjectName><SccAuxPath /><SccLocalPath>.</SccLocalPath><SccProvider>MSSCCI:Team Foundation Server MSSCCI Provider</SccProvider></SqlWorkbenchSqlProject>




          2013-06-28T15:50:27.919788+01:00
          SQL
          cerberus

          Windows Authentication
          master
          15
          0
          NotSpecified
          Microsoft SQL Server Management Studio - Query


          2013-07-02T15:27:02.5793203+01:00
          SQL
          hector

          Windows Authentication

          15
          0
          NotSpecified
          Microsoft SQL Server Management Studio - Query






          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI001_AddressHistory.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:hector:True
          hector

          PMI000_DataWarehouseState.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI003_PlannedAdmissions.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI004_AllActivity.sql


          8c91a03d-f9b4-46c0-a305-b5dcc79ff907:cerberus:True
          cerberus

          PMI002_ClinicCodes.sql







  $/DataWarehouse/Dev/Reports/PMI

  .
  MSSCCI:Team Foundation Server MSSCCI Provider

So:

(a) any idea how I modify the transform to achieve my aim and why, and

(b) where is the junk coming from? I have no XSL nodes that are xsl:value-of, so why are values being output for nodes that have already been processed, and lastly,

(c) in general, if I want to generate as output, the input file, except for a subtree that I want to treat differently, what is the pattern to do this?

Any help will be very much appreciated.

Many thanks,

Mark



Empty Elements with self closing tags

$
0
0

I will like to add a self-closing tag to an empty elements   using DOM  C#

 
Example:


<tag test"ttt"> </tag>

<tag test"ttt"/>

3D effects in tiles in xaml

$
0
0

I am using MahApps.metro a third party library for creating tiles in wpf xaml but I need these tiles to give a 3D effect.

Can anyone provide me piece of code for 3D effects on these tiles.

My code is:

<controls:Tile TiltFactor="2" Background="Transparent" Foreground="White" Grid.Row="1" Grid.Column="1" Width="{Binding TileWidth,UpdateSourceTrigger=PropertyChanged}" Height="{Binding TileHeight,UpdateSourceTrigger=PropertyChanged}" controls:ControlsHelper.MouseOverBorderBrush="White" ToolTip="Home" Command="{Binding RestartCommand}" BorderBrush="#FF0080FF" BorderThickness="1">

                   

                   <Grid Width="{Binding TileWidth,UpdateSourceTrigger=PropertyChanged}" Height="{Binding TileHeight,UpdateSourceTrigger=PropertyChanged}">

                       <Grid.RowDefinitions>

                           <RowDefinition/>

                           <RowDefinition Height="20"/>

                       </Grid.RowDefinitions>

                       <Grid Grid.Row="0" Width="{Binding IconWidth,UpdateSourceTrigger=PropertyChanged}" Height="{Binding IconHeight,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

                           <Grid.Background>

                               <ImageBrush ImageSource="../Images/home.png"/>

                           </Grid.Background>

                       </Grid>

                       <TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="16" Foreground="#FF0080FF" FontWeight="Bold" Margin="0,0,0,5"><Run Text="Home"/></TextBlock>

                       

                   </Grid>

               </controls:Tile>

Viewing all 935 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>