microsoft.public.dotnet.xml Archive - May 2002
Post a message to this list
Messages
Page: 1234
Question ? Serializing Arraylist of object (3 replies)
microsoft.public.dotnet.xml
Hi Guys , I am trying to serialize my object that contains ArrayList of other objects but I'll get an error when I try to write it to XML file can anybody help me with that? Thanks in advance Error Message : An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll Additional information: There was an error generating the XML document. here is my code sample : cl...
What is the best way to format date in XSLT (dotnet) ? (10 replies)
microsoft.public.dotnet.xml
I used to format date from ISO format (2001 08 04T02:20:00) to normal format in XSLT by using this msxsl script: msxsl:script language "VBScript" implements prefix "myweb" Function ConvertDate(nodeList) ConvertDate FormatDateTime( Left(nodeList(0).nodeValue, 10),2) End Function /msxsl In .NET I changed the sctipt to msxsl:script language "VB" implements prefix "CTCommon" Function ConvertDate(node)...
Getting XslTransform.Transform() to work with XML schemas (2 replies, VIP)
microsoft.public.dotnet.xml
All of the examples in the Framework SDK show doing transformations on XML documents that don't point to a schema. I am trying to do a transformation on an XML file that has it's root node pointing at a schema, and can't get it to work. When I take the reference to the schema out by hand, it works fine. Here is a sample of the XML: ClientData xmlns "http://tempuri.org/ClientData.xsd" Hardware Syst...
error while executing store procedure command (3 replies)
microsoft.public.dotnet.xml
hi i'm getting an error message when trying to execute a store procedure. i'm using an ODBC driver to access Sybase 11 database server (the ODBC driver from microsoft) the error messgae is: "ERROR [HY000] [INTERSOLV][ODBC SQL Server driver][SQL Server]ct param(): user api layer: external error: An illegal value of 1024 was placed in the status field of the CS DATAFMT structure." the store procedur...
'xsl' is an undeclared namespace (3 replies)
microsoft.public.dotnet.xml
When I call the Load method of an XslTransform, I always get this error: "'xsl' is an undeclared namespace" My stylesheet looks like this, which I ripped from an example in a book somewhere. (I'm pretty new to XML and XSL.) Can anyone tell me what I'm doing wrong? ?xml version "1.0" encoding "UTF 8" ? xsl:stylesheet version "1.0" xsl:template match "/" html body table xsl:apply templates/ /table /...
XsltProc (2 replies)
microsoft.public.dotnet.xml
It looks like this has been fixed, possibly at your instigation: The MSDN library now states at http://msdn.microsoft.com/library/default.asp?url /library/en us/cpref/html/frlrfsystemxmlxpathxpathnavigatorclassselecttopic2.asp the following, which I have verified to work: If the XPathExpression requires namespace resolution, the prefix and namespace URI pair must be added to an XmlNamespaceManager...
Node attributes - help! (4 replies, VIP)
microsoft.public.dotnet.xml
Can someone please tell me how I can update the attribute of a node? (using c#) I have to use xpath to get the correct node from the xml file using an ID as the parameter. This returns a node of type XmlNode. However, this type does not contain anything which allows me to update the value of an attribute. (if it was an XmlElement I could use the SetAttribute command). How can I do this? string xpa...
xml file locked (3 replies)
microsoft.public.dotnet.xml
I have a procedure in my aspx page that writes an xml file: Private Sub WriteXmlToFile(ByVal Dataset11 As DataSet) If DataSet11 Is Nothing Then Return End If Dim filename As String "C:\Program Files\myXmlDoc04262002.xml" Dim myFileStream As New System.IO.FileStream (filename, System.IO.FileMode.Create) Me.DataSet11.WriteXml(myFileStream) End Sub The problem is that I get an error on my page: The p...
Serializing my class to a stream (5 replies)
microsoft.public.dotnet.xml
Okay, I can serialize my class to an XML file.. thats no problem, it's also not terribly useful. I want to serialize my class in a fashion that will allow me to pass it out to another object.. So I Serialize my class like this : public MemoryStream GetMeSerialized() { MemoryStream myMemStream new MemoryStream(); System.IO.TextWriter w new StreamWriter(myMemStream); XmlSerializer serializer new Sys...
How to update an XML Document (Newbie) (4 replies)
microsoft.public.dotnet.xml
Hi all, I have the following methods, which create and, hopefully update and XML file. This is my first foray into XML and I am having all sorts of problems trying to understand the syntax. Yes I have books but they don't seem to explain anything this simple : ) public void writeXml(String attribute, String data) { XmlTextWriter myXmlTextWriter null;myXmlTextWriter new XmlTextWriter (xmlFile, null...
MSXML, C# and huge memory leak (4 replies)
microsoft.public.dotnet.xml
Hi I'm translateing a xml message and have to do it a lot. We use MSXML ver. 4 and we have notice a huge memory leak in our program. We have isolate the leak to one function. We have removed everything but 2 lines, se below. Is is possible that the dotNet environment dose not free the memory. public void TranslateXML( string strMsg ) { DOMDocument oDoc new DOMDocumentClass( ); oDoc null; }
Error in importing node (2 replies)
microsoft.public.dotnet.xml
Hello All, I am using the Import Node API of the XmlDocument class to import a node from another XmlDocument. however I get an error nhandled Exception: System.ArgumentException: The node to be inserted is from a different document context. at System.Xml.XmlNode.AppendChild(XmlNode newChild) at ImportNode.Main(String[] args) my program looks like using System; using System.Xml; public class Import...
Enhancing XML writing speed (2 replies)
microsoft.public.dotnet.xml
This is a simple question, but I can't find anything answering. I have a XML file in which I search for a specific tag, in which I add some sub tags. If it don't exists, I just create it. My code looked like this: Try dim node as XmlNode root(theNodeImSearchingFor) root(theNodeImSearchingFor).innerXml node.innerXml & theNewContents Catch TheError As Exception dim newNode as XmlElement xd.CreateEle...
Sending XML documents via socket: How to tell which class is being sent? (2 replies)
microsoft.public.dotnet.xml
Hi, I would like to send one of several classes over a socket connection by encoding them in XML. On the receiver side, how do I make my code automatically figure out *which* class is being sent so it can decode it properly? Below is my "decoder". It only knows how to process a class of type Message. Is there a way that I can have this code automatically figure out if it has received the class "Me...
Large XML files (8 replies)
microsoft.public.dotnet.xml
BEGIN PGP SIGNED MESSAGE Hash: SHA1 I am doing feasibility work on a couple of areas for an application. We have hardware that runs a stylus over a surface to measure its profile. Each data point consists of an x coordinated, and a gauge reading. And there are potentially 2 million points. In the first instance, I considered using XML to store the data on disk. This has the advantage that the data...
copy dataset and datatable (2 replies)
microsoft.public.dotnet.xml
I want to copy an exisiting dataset to a new one and then get one of it's table Public Class Global Public Shared DB As New DataSet("DS Data Set") End Class . . . Dim dsTarget As New DataSet() Dim dt As New DataTable() dsSource Global.DB.Copy dt dsSource.Tables("Colors").Copy dsTarget.Tables.Add(dt) return dsTarget i get exeption: "DataTable already belongs to another DataSet."
XmlNodeList (2 replies)
microsoft.public.dotnet.xml
Hi, I have cretated a XmlNodeList called "a" of 500 nodes from a XmlDocument. Now I want to pick the nodes from "a" that I am intrested in and add them to a new XmlNodeList named "b". My question is how to copy some specific nodes from a XmlNodeList into a new XmlNodeList which I want to populate in runtime? I am looking for something that works like ArrayList.Add(). Please help me out with some s...
XML Node Lookup (4 replies)
microsoft.public.dotnet.xml
Can anyone tell me how to find a specific node? Ok, I have a root element: FileSystem I want a child node of FileSystems first child which happens to be a FOLDER who's Path attrib is "C:\Documents and Settings\Administrator\My Documents" So what i need to do is find an element which is a child of the My Documents FOLDER element. Each FOLDER element has a Path attribute which is, for now, unique. a...
XML on demand supported in DOM ? (5 replies)
microsoft.public.dotnet.xml
Hi, We have some XML data that is huge. We never need all the data, but part of the tree needs to be loaded in memory on demand. Is there a way to load XML on demand in DOM ? Can a node be expanded only when it is accessed. I tried to look for any demand loading in DOM, but couldnt locate any. One example problem would be a tree representing the file system. Any information would be very useful an...
Wanted: Minimal Schema Validation Example (2 replies)
microsoft.public.dotnet.xml
I need a minimal example example of an XML schema and validation. This example used to work with MSXML4 but works no longer and I don't know why. What is the command line utility in .NET I could use to validate this? file GreetingXSD.xml: ?xml version "1.0" ?xml stylesheet href "greeting.xsl" type "text/xsl"? page xsi:noNamespaceSchemaLocation "greeting.xsd" xmlns:xsi "http://www.w3.org/2001/XMLSc...
Could someone please help me figure this out? (4 replies)
microsoft.public.dotnet.xml
Here is the scenario: I an XML file with the following format: ' ' Begin XML ' bible tstmt bookcoll book bktshort Genesis /bktshort chapter chtitle Chapter 1 /chtitle v In the beginning... /v /chapter /book /bookcoll /tstmt /bible ' ' End XML ' I am using this XML file in a VB.NET Windows Application. I want to search the 'v' node for a string. I also need to be able to tell what book and chapter ...
copy nodes from one document to another (2 replies)
microsoft.public.dotnet.xml
Scenario: I search multiple xml documents located on my drive to locate certain nodes. As I finish a document, I need to add the nodes to a new XML document that will be returned via a web service to the user. Sample Code Below: private void LoadXMLDocument(string fileName) { XmlNodeList nodes null; XmlDocument doc null; doc new XmlDocument(); doc.Load(fileName); nodes doc.DocumentElement.SelectNo...
XML transform (3 replies)
microsoft.public.dotnet.xml
I posted this in dotnet.vb but was told it would be more appropriate here, just a question on the XML .NET structure, Im using VB .NET. From: "Chris Balmer" chris@portcomputers.net Subject: XML transform, and webcontrol question Date: Sunday, May 05, 2002 3:06 PM Im trying to take an xml file, apply the xsl style to it and get the html output from it to seed into an internet explorer web control (...
XSLT performance (2 replies)
microsoft.public.dotnet.xml
Hi Has anyone got performance stats on doing XSL transforms on large XML docs? Thanks Simon
Message "The active schema does not support the element..." (3 replies)
microsoft.public.dotnet.xml
Ok, wading into my first attempt at XML, I made up a very simple XSD file then created a corresponding XML file. They both seem to work, except if I view the XML code, the IDE squiggly underlines the MillSoft and the corresponding tooltip says "The active schema does not support the element MillSoft." The schema was created entirely in the Schema view and the XML file was created in the Data view ...
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification