Skip to content

XML / XSL

Discussions on XML and related technologies

This category can be followed from the open social web via the handle xml-xsl@forum.codeproject.com

2.6k Topics 6.8k Posts
  • DocBook PDF

    xml question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Transformed XML Display

    html xml tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    T
    One way to do this is to learn Xsl Transformations (W3C Tutorial[^]), transform Xml to Html using System.Xml.Xsl.XslTransform object and display it using WebBrowser COM object. (See Hosting a webpage inside a Windows Form[^] and Using the WebBrowser control in .NET[^]) Tomáš Petříček  :baaaa!: EeekSoft Tools www.eeeksoft.net
  • Loading XSL Templates

    xml wpf sysadmin business tools
    4
    0 Votes
    4 Posts
    0 Views
    B
    I have seen this done using xsl:param directly under the xsl:stylesheet declaration to pass in parameters, but I have only seen this work with command-line processors like Saxon, Xalan. Unfortunately, MSXML does not support top-level parameters. The workaround would be to append the data you want to pass through a parameter in the XML to be transformed and read it into a top-level variable.
  • How 2 get stared on XML (newbie)

    xml json learning
    4
    0 Votes
    4 Posts
    0 Views
    B
    Oops... sorry, I mis-read your post and thought you were looking for XSL resources.
  • How to convert fixed width text file to Xml file

    csharp database xml help tutorial
    4
    0 Votes
    4 Posts
    0 Views
    J
    Console application: Option Strict Off Imports System.IO Imports System.Xml Module Module1 Sub Main() Try Dim iStartPositions As Integer() = {0, 4, 5, 14} Dim sFixedWidthText As String = GetFileContents("C:\FixedWidthText.txt") Dim sw As New StringWriter Dim writer As New XmlTextWriter(sw) writer.WriteStartElement("Rows") Dim sRows As String() = sFixedWidthText.Split(vbCrLf) Dim iRow, iColumn As Integer Dim sRowText As String Dim al As ArrayList For iRow = 0 To sRows.Length - 1 writer.WriteStartElement("Row") sRowText = sRows(iRow) al = GetDelimitedTextArray(sRowText, iStartPositions) For iColumn = 0 To al.Count - 1 writer.WriteStartElement("Column" & iColumn) writer.WriteString(al(iColumn)) writer.WriteEndElement() Next writer.WriteEndElement() Next writer.WriteEndElement() SaveTextToFile(sw.ToString, "C:\FixedWidthText.xml") Console.WriteLine("File saved") Console.ReadLine() Catch ex As Exception Console.WriteLine(ex.ToString) Console.ReadLine() End Try End Sub Public Function GetDelimitedTextArray(ByVal sRowText As String, ByVal iStartPositions As Integer()) As ArrayList Dim al As New ArrayList Dim i As Integer Dim sColumnText As String For i = 0 To iStartPositions.Length - 1 If i = iStartPositions.Length - 1 Then sColumnText = sRowText.Substring(iStartPositions(i)) Else sColumnText = sRowText.Substring(iStartPositions(i), iStartPositions(i + 1) - iStartPositions(i)) End If al.Add(sColumnText) Next Return al End Function Public Function GetFileContents(ByVal FullPath As String) As String Dim sContents As String Dim oReader As New StreamReader(FullPath) sContents = oReader.ReadToEnd() oReader.Close() Return sContents End Function Public Sub SaveTextToFile(ByVal sData As String, ByVal FullPath As String) Dim oWriter As StreamWriter oWriter = New StreamWriter(FullPath) oWriter.Write(sData) oWriter.Close() End Sub End Module
  • How to obtain the XM-format for MS-Project?

    help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Error while creating Xml from dataset

    help xml tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    D
    I ran into this same "issue", and I ended up just storing the Date as a string in the XML and then converting it back into a Date/Time when I read the data back in ... There's probably a more "direct" approach to take, but this works just fine. D.
  • MSXML PARSER 4.0 problem

    xml performance help question
    5
    0 Votes
    5 Posts
    0 Views
    I
    it's not the debug mode. i was trying to perform .Release() on the XML IXMLDOMDocument2Ptr object at different places in the code - in order to search for the place that keeps the resources unreleased after that method call. i found that the method released the resources, until i used a function call, to my own function which one of its parameters is from type IXMLDOMNodePtr. i could see that a new reference to the object was added, but i wasn't able to release the resources after this function all, even by using "= NULL" on the object in this function plus the original one that was sent. am i not releasing the object as i should? can't i send a smart pointer as a parameter to my own function and get rid of the object afterwards (not the object - it's cought resources - the object itself becomes NULL)?
  • some body help me............!

    database question csharp asp-net mobile
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • XSLT in EVC++?

    xml c++ html hardware tools
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • HELP! XPath Syntax

    xml database design regex help
    3
    0 Votes
    3 Posts
    0 Views
    M
    Thanks for the Reply, I ended up figuring it out this morning in 15min ;P (after working on it for 10hrs yesterday)... I ended up with this: //DataRow[DataColumn[@Name='DatabaseID' and @Value='1'] and DataColumn[@Name='ID' and @Value='26']]
  • How to send XMLdata to exe file

    regex xml tutorial question
    7
    0 Votes
    7 Posts
    0 Views
    Y
    thank you. I try it. Best Regards, yu-yu
  • How to Determine if element contains a given attribute

    tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    M
    Are you sure this is easier/more efficient that the method previously suggested, especially given that the current element node is already known and sotred in a local variable? ~Mike Stanbrook
  • XML round trip problems

    xml help question
    4
    0 Votes
    4 Posts
    0 Views
    C
    Good point - the XML generated is bursting with type information, so there's no reason I can see for this not to work, but it doesn't. How pathetic. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
  • MSXML Parser??CreateNode????

    xml help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    P
    i think you need XmlDocument.ImportNode "When the only tool you have is a hammer, a sore thumb you will have."
  • utility/library to clean-up xml-strings (&amp, etc)

    tools xml
    4
    0 Votes
    4 Posts
    0 Views
    J
    Just to confirm the characters: & < > " ' ControlChars.Quote is the equivalent for C's \" Jim
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Really interesting problem !

    database xml help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • DataSet from XML Schema

    xml help database question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • XML Complex Type, DataSet

    xml question database
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied