microsoft.public.dotnet.xml Archive - July 2002
Post a message to this list
Messages
Page: 12345
xml to dataset (2 replies)
microsoft.public.dotnet.xml
Hello, I have a xml file that looks like this level0 content0 "test" level1 content1 "test" level2 text "test" / level2 text "test" / /level1 level1 content1 "test" / /level0 level0 content0 "test" level1 content1 "test" / /level0 In my asp.net page, I read this xml file into a dataset. Next thing I want to do is loop through the dataset and return the items and write it to a label. But I want to ...
customise XML transformation of the Dataset like i want (3 replies)
microsoft.public.dotnet.xml
hi, i do have a dataset containing some tables (retrieved from a SQL query). when i make a myDataset.WriteXML it gives me an XML file i'd like to transform later by myself. The problem is that the XML structure is not very good, the nodes struture is not like what i'd like. Is there a way to customize the XML structure so that the WriteXML() gives me exactly what i want ? is the answer in a typed ...
SOAP Callbacks (3 replies)
microsoft.public.dotnet.xml
I have created a simple ATL Web Service and a simple Client for the service. The client runs smoothly over SOAP (no pun intended) to the Service. However, I want to do call backs to the client. Unfortunetly the exposed method off of the interface can only have the return value of HRESULT, so I can't send information to the callback. An help, suggestions, rays of hope? The other option is to use th...
Complex Types in XSDs and DotNet DataSets (2 replies)
microsoft.public.dotnet.xml
Man, I love this XML schema stuff in .NET. Okay, not really. While it seems fantastic that .NET automatically generates these strongly typed datasets based on my XSD, .NET seems to drop the ball on complex types. The complex types I use I intend to act as sort of "base classes", where other entities can leverage that established data definition. This isn't true inheritance, I know, but I'm brand n...
XML > Structure (3 replies)
microsoft.public.dotnet.xml
(Warning.. XML newbie) Note, after I wrote this... I ment this to be a short post, I apoligise for being long winded I would like to write a VB.NET application which takes an XML document and loads it into an structure array at runtime i.e. Public myArray() as myEntry Public Structure myEntry Public myString as String Public myInteger as Integer Public myByte as Byte End Structure my problem (othe...
String to XmlTestReader readable format (c#)? (2 replies)
microsoft.public.dotnet.xml
In C#, the class I'm coding is being sent and entire XML document in the form of a String. I can't figure out how to get the String into a format that can be read with the XmlTestReader class, or anything similar.
XmlTextReader problem (2 replies)
microsoft.public.dotnet.xml
Hy... I have a problem with the XmlTextReader where i m stuck. If an Node occurs which looks like this NodeName attribut "attributvalue / NodeName2 attribut2 "attributvalue2 / ist this Xml conform. With XmlTextReader.Read it checks that the XmlNodeType ist Element that means that the Node beginns. Attributes can be read, but he does not know that the Node also is closed at same time. When Read is ...
XSLT Transformations (3 replies)
microsoft.public.dotnet.xml
I'm trying to get the data from a dataset out to a CVS text file. I'll use dataset.GetXML to get the xml and dynamically (in code) generate the XSLT based on the columns in the dataset. Below I simply have strings that contain these for now and write them to a stream to illustrate. It works except that the transform writes out ?xml version "1.0" encoding "utf 8"? at the top of the file. I don't wa...
Consuming DataSets with Java client (2 replies)
microsoft.public.dotnet.xml
I've developed a number of .Net WebServices that return strongly typed DataSets from the WebMethods to the consumers. I'm doing some research on how Java environments can accept the serialized XML and XSD and represent the relational data in an object like the .Net DataSet. What is the prevailing method that Java clients use to deserialize the XML that represents a DataSet from a .Net WebService? ...
Serialization to an XmlDocument (2 replies)
microsoft.public.dotnet.xml
The following code works fine, but i'd really like to avoid having to use a memorystream as a temporary copy buffer, and be able to serialize the fragment object directly into the XMlDocument object XmlDocument doc new XmlDocument(); MemoryStream writer new MemoryStream(); serializer.Serialize(writer,fragment); writer.Flush(); writer.Position 0; doc.Load(writer); writer.Close(); I'm trying to do s...
Resolution of custom URI in xsl:include and xsl:import (2 replies)
microsoft.public.dotnet.xml
Hello All, I have been trying to read the documentation on XMLResolver class but have not succeeded so far implementing my URI Resolver. I have XSL which looks like xsl:stylesheet xmlns:xsl "http://w3.org/1999/XSL/Transform" version "1.0" xsl:include href "toolbar:toolbar.xsl" / xsl:include href "menu:menu1.xsl" / xsl:tempalate match "/" ....... /xsl:template /xsl:stylesheet Now I want to write a ...
WaitCommEvent (2 replies)
microsoft.public.dotnet.xml
I've been trying to get the following code, [DllImport("kernel32.dll")] private static extern bool WaitCommEvent(int hFile, ref int lpEvtMask, ref OVERLAPPED lpOverlapped) [DllImport("kernel32.dll")] private static extern bool SetCommMask(int hFile, int lpEvtMask); private void myListener() { int lpEvtMask 1; bool fSucces; OVERLAPPED o new OVERLAPPED(); fSucces SetCommMask(hComm, lpEvtMask); if (!...
ReadXml can't find file (2 replies)
microsoft.public.dotnet.xml
I'm writing a simple test to read in a xml file to the dataset. And the ReadXml() call kept getting 'Can't find file' error. I know the file is there. And the ReadXmlSchema() call works fine. Did I miss something? Thanks for helping. Here is the code: Module Module1 Sub Main() Dim objDataSet As New DataSet() objDataSet.ReadXmlSchema("C:\xmltest\ST new.xsd") objDataSet.ReadXml("C:\xmltest\newdata1"...
XPath query. Why does its result seem to me erroneus? (3 replies)
microsoft.public.dotnet.xml
Hello. I'd be grateful if You can explain me. I perform the following XPath query on the xml document below searching for a Flow element. XmlDocument doc new XmlDocument(); doc.Load("XHouse.xml"); XmlNodeList nodeList; XmlElement root doc.DocumentElement; nodeList root.SelectNodes("//Flow"); foreach (XmlNode isbn in nodeList) { Console.WriteLine(isbn.OuterXml); } Here is the Xml document (XHouse.x...
xsd.exe error: type not supported b/c it implements IDictionary (4 replies)
microsoft.public.dotnet.xml
I am trying to generate an XML Schema file from an EXE. One of the classes the app containes is: public class Foo.Bar.MyDictionaryClass : DictionaryBase { .... } However, when I run xsd.exe on that EXE file, I get the message: "The type Foo.Bar.MyDictionaryClass is not supported because it implements IDictionary." Anyone know what the problem could be? Thanks. JB
Return custom class from XML Service? (9 replies)
microsoft.public.dotnet.xml
Hey guys, I've written a second class in my xml service because i would like my clients to be able to access it. However, it seems that clients can only access functions and sub routines, is this true? When I try to write a function to return my class, ASP.NET spits out an error. From the client side, i'd like to do this: Dim x as service1 Dim ret as x.myClass new x.myClass(arguments) msgbox ret.p...
Reading / Writing XML Comments (3 replies)
microsoft.public.dotnet.xml
Hello, I'm attempting to use VB.NET to read an XML file into a dataset, update the dataset via a windows form, then write the XML data back to the file after updating the dataset.(Using ReadXML and WriteXML dataset methods) This process is working correctly except all the comments from the original XML file are stripped from the file, and I need the comments to remain in the XML file after the mod...
XmlNodeWriter (2 replies)
microsoft.public.dotnet.xml
Hello, Where is the XmlNodeWriter?....It seems that this class doesn't integrate the final release of .Net Framework. I need to write an XmlDocument using a XmlWriter interface, and I want try to avoid using the XmlTextWriter (with a StringWriter) and then a XmlDocuement. Somebody knows some implementation of the XmlWriter class that I can download? Thanks for your help, Nicolás
XMLDocument WebService - Invalid Cast (3 replies)
microsoft.public.dotnet.xml
Hello, I have a XML Web Service (ws), which returns System.Xml.XmlDocument. I then try to consume the WS by using: Dim doc As System.Xml.XmlDocument New System.Xml.XmlDocument() doc ws.GetData() and I get the "Specified cast not valid" error. Doesn't this work? I currently have the following code, which works OK: Dim doc As System.Xml.XmlDocument New System.Xml.XmlDocument() doc.LoadXml(ws.GetData...
SetStartMode (4 replies)
microsoft.public.dotnet.xml
Is there a way with .NET XslTransform to do the equivalent of setStartMode which is available in MSXML 3.0... we have a ton of XSL that relies on this.
collection serialization to XML (8 replies)
microsoft.public.dotnet.xml
Hi! I'm trying to serialize an object which contains a collection. this is the code of the object Persona. public class Persona { .... .. [XmlAttribute("Nombre")] public string Nombre { get {return m Nombre ;} set {m Nombre value;} } [XmlElement(typeof(Email))] I don't know what to put here public Emails Emails { get {return m Emails;} set {m Emails value;} } } The Emails collection is defined lik...
Different encoding for XmlSerializer and MessageQueue XmlFormatter (3 replies)
microsoft.public.dotnet.xml
hi there, I use to serialize my object with the following code: XmlSerializer myser new XmlSerializer(typeof(ftService.ftCommand)); System.IO.StringWriter mystr new System.IO.StringWriter(); myser.Serialize(mystr, myCommand); which produces a string with an xml document starting like the following: ?xml version "1.0" encoding "utf 16"? FlowTalkCommand xmlns:xsd "http://www.w3.org/2001/XMLSchema" x...
XPathNavigator.Evaluate bug? (3 replies)
microsoft.public.dotnet.xml
This is the context: If I have a simple xpath expression like: "price 10" And if I have selected nodes from an XPathDocument with another expression: "//publishers/titles" I want to execute the first expression in the context of the nodes selected by the second one. I would use: XPathNavigator nav document.CreateNavigator(); XPathExpression expr nav.Compile("price 10"); XPathNodeIterator nodes nav...
xs:DateTime Writing Problem (5 replies)
microsoft.public.dotnet.xml
Hello, I am writing a simple logging utility (somewhat similar to Log4J), and I need to write a timestamp to an XML file. In my schema, the timestamp is defined as an xs:dateTime, which is fine. Is there a way to easily convert System.DateTime.Now to xs:dateTime? I've played around with the XmlConvert method(s), but it looks like it converts from the xsd format to one readable in C#. I need to do ...
Is it an XML or not? (4 replies)
microsoft.public.dotnet.xml
I want to write a function to find out whether a String denotes a valid XML structure. I load I could use try to load the xml using XmlDocument.loadXml or use XmlValidatingRead.Read to see whether a string contains a valid, welformed XML. The problem is these methods would throw Exception to denote that the string is not a valid XML. But I don't want exceptions to be thrown, as they are expensive,...
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