microsoft.public.dotnet.xml Archive - March 2003
Post a message to this list
Messages
Page: 123
bug in XMLNodeReader skip() method? (2 replies)
microsoft.public.dotnet.xml
According to the documentation, calling skip() on an xmlreader class is supposed to skip the children of the current node and advance to the next element. However, the behavior I'm seeing in the XML below is that I call skip after reaching the span multi 'true' and it skips to "True", the value of the element after the span. I would expect it to skip to imageinclude . root image width '12' height ...
Newbie XML storage question? (2 replies)
microsoft.public.dotnet.xml
I'm only used XML superficially, most of my background is database programming. But I don't mind learning new things. I'm writing an application that will store data in XML and will not be connect to a database. The data will have complex relationships. Should I save this data as XML Schema or just use a Dataset and save it as an XML Dataset? What are the difference between the two? Eric
problem with validating xml in visual studio (2 replies)
microsoft.public.dotnet.xml
Hellow, I'm having a problem with validating an xml file in visual studio. I have the assumption that visual studio uses the msxml library to check the xml. I have made a very simple xsd and xml to demonstrate the problem. XSD : ?xml version "1.0" encoding "UTF 8"? xs:schema xmlns:xs "http://www.w3.org/2001/XMLSchema" elementFormDefault "qualified" attributeFormDefault "unqualified" xs:element nam...
Getting rid of odd leading characters in transformed output (3 replies)
microsoft.public.dotnet.xml
I'm applying an XSL file using xsl:output method "text" / to an XML file. The resulting output is fine except that the output starts with 3 odd characters. These are encoded as the bytes 0xEF 0xBB 0xBF followed by CR/LF (0x0D 0x0A). What are these leading 3 chars and how do I get rid of them? ï Paul
converting from msxml2 to system.xml (2 replies)
microsoft.public.dotnet.xml
Hi, I have a problem trying to convert the following code snippet rom msxml2 to system.xml. could someone please point me in the right direction so tat I can complete my dot net upgrade. Thank you!. Public Function TransactionTree(ByVal trans id As Long) As String Dim objXML As New MSXML2.DOMDocument Dim objXMLDep As New MSXML2.DOMDocument Dim objCurElement As MSXML2.IXMLDOMElement Dim objXMLDepen...
Serialize InnerText of an XmlElement with an Attribute? (2 replies)
microsoft.public.dotnet.xml
How can you serialize an Element to have both InnerText and an Attribute? For example, how would you do so using the following xsd definition? xsd:element name "Identifier" type "xsd:string" xsd:attribute name "authority" use "required" type "xsd:string" / /xsd:element The result should look like: Identifier authority "TestString" TestIdentifier /Identifier How would you set up a class to handle t...
XPath query (2 replies)
microsoft.public.dotnet.xml
C# I have a document and I'm trying to select the node Resources using SelectSingleNode I cannot seem to get the XPath string right and the node returned is always null. I would appreciate a pointer on how to do this. MyDoc Tasks Task /Task Task /Task /Tasks Resources Resource /Resource Resource /Resource Resource /Resource /Resources /MyDoc
Copy a node into a new xmlDocument from XPathDocumet (3 replies)
microsoft.public.dotnet.xml
Hi, I am using CreateNavigator() of xmlDocument() to quickly find a node in the loaded xml. Now, how is it possible to copy that node and everything under it to a new xmldocument? Navigator does not provide any method to xmlnode(). Many thanks in advance. George.
SelectSingleNode question (3 replies)
microsoft.public.dotnet.xml
Hi, I have a piece of XML that looks something like this... Person Name FirstName Simon /FirstName LastName Keep /LastName /Name /Person if I do XmlNode xxx SelectSingleNode("/Person/Name"); it returns the 'Name' node. But if I now do XmlNode yyy xxx.SelectSingleNode("LastName"); it doesn't find it. It seems to think that xxx contains the full tree and not just the node I have searched for. I woul...
XSD validating problem: default values (2 replies)
microsoft.public.dotnet.xml
Hello, I have a problem in validating xml docs that have been created via a serialization class or dataset (generated with xsd.exe): when the xsd schema contains a "default" value for an element or attribute: if the instance XML doc does not express a value for such an element, validation fails. The Schema looks like this: xs:schema targetNamespace "URN:testdoc" xmlns:xs "http://www.w3.org/2001/XM...
Xml Deserialization: how to detect the target type (2 replies)
microsoft.public.dotnet.xml
Hello, I am trying to deserialize objects from an XmlReader, and I would like to determine the type of the object being deserialized by 'looking' ahead in the Xml fragment. For example, assume that I have a table that maps Qualified Name to .NET types, I would like to do the following: Find the root node accessed by the XmlReader Lookup the corresponding type in my table Create an XmlSerializer wi...
use-attribute-sets is slow with System.Xml.Xsl.XslTransform (3 replies)
microsoft.public.dotnet.xml
in my ASP.NET application i'm using System.Xml.Xsl.XslTransform with System.Xml.XPath.XPathDocument to do all my xml processing. so i'm profiling, and notice that xsl processing is taking up 50% of a given page hit. there are 13 different xsl's being processed for this page, so i reorged the code temporarily such that each xsl transform is called by a method dedicated to the specific xsl file bein...
problem with XSD with includes as embedded resources (2 replies)
microsoft.public.dotnet.xml
I have xsd schemas that are embedded resources. The xsds have includes. I have written a custom XmlResolver to find the includes. I have tried loading the schema with an XmlReader and setting the XmlResolver property on that, and loading the xml doc I want to validate in an XmlValidatingReader and setting the XmlResolver property on that, but no matter what I do the custom resolver does NOT get us...
schema validation problems (2 replies)
microsoft.public.dotnet.xml
I am having 2 problems trying to validate my XML file against a schema: 1) wrong attribute names in the input XML file are not raising an error of any kind; and 2) wrong element names are by passing the validation handler and a system.xml.xmlException error is thrown Any ideas on what may be going wrong are appreciated. Thanks, Beth [WebMethod] public string TestSchemaValidation() { XmlSchemaColle...
XML Serialization (2 replies)
microsoft.public.dotnet.xml
I'm currently working with XML Serialization. Whith this code: Class definition //************************* public struct NetPrice { private int ammount; private string currency; [XmlAttribute(AttributeName "currencyISOcode")] public string Currency { get {return currency;} set{currency value;} } [XmlElement(ElementName "ammount")] public int Ammount { get{return ammount; } set{ammount value;} } T...
How to tolerate extraneous data? (3 replies)
microsoft.public.dotnet.xml
I have an application that takes an xml file as input. Currently I am using the XmlDocument.Load method to read the file. The problem is that sometimes there are extraneous non xml records in the file both before and after the xml. The xml itself is valid. What is the best way of dealing with the extraneous data, i.e., making the parser skip until it finds the first valid xml record and stop when ...
Help/advice on XML parsing values (2 replies)
microsoft.public.dotnet.xml
Hi, Below is an XML document which i read with the XMLTextReader object. It's a list of several orders and it's order lines, head and body . What i need to do is extract the data from all orders in this document and place some of the values in a database, aswell as display the data from the XML document on an ASP.NET page. I will obviously need to be able to separate every orderhead ( head and it'...
Help with Serialization and Nested Objects (2 replies)
microsoft.public.dotnet.xml
[Serializable] public class Post { [XmlAttribute] public int ID { get; set; } public string Subject { get; set; } public string Body { get; set; } public PostCollection Children { get; set; } } Normally serialization would produce this result: Post ID "1" Subject This is the subject /Subject Body This is the body /Body Children Post ID "2" Subject This is the subject /Subject Body This is the body...
SelectSingleNode problem (4 replies)
microsoft.public.dotnet.xml
I try to get a node using selectsinglenode and it returns null. XmlDocument doc new XmlDocument(); doc.Load(xmlFile); // Select the context node XmlNode root doc.SelectSingleNode("LCCE"); My xml doc is below ?xml version "1.0"? ! This file represents a default LCCE Project file xmlns "http://tempuri.org/default.xsd" LCCE xmlns "http://tempuri.org/default.xsd" System type "autobiography" date "1981...
XML Datasets in .NET (4 replies)
microsoft.public.dotnet.xml
I have a (stupid) question about dataset. In Microsoft .NET it is possible to make a DataSet with the help of the DataSet object. In J2EE however it is also possible to make a dataset. My question is if DataSets is standardized (by for example W3C) so it is possible for a client built in J2EE to recieve a XML DataSet from server application built in VS .NET? Maby someone could direct me to a site ...
Xml Serialization (2 replies)
microsoft.public.dotnet.xml
Hi everyone I need to do some custom serialization, but i need it to be done in plain xml (so i can not use SoapFormatter). I though about using XmlSerializer, but i have the following problem. My class looks like class C1 { byte var1; Parent P; public C1 () { this.var1 1; this.P new Son1(); } } abstract class Parent {} class Son1 : Parent { byte var2; /*....*/ } class Son2 : Parent { /*....*/ } w...
SQLXML SoapHeaderException from ASP.NET (3 replies)
microsoft.public.dotnet.xml
I have an asp.net page which runs stored procedures on MSDE via a web reference using sqlxml. I first encountered an error when I used a certain SP and got a SoapHeaderException. Once this SP failed, others which hadn't failed before would also start giving me the same exception. IIS would refuse to restart the web site and I would have to reboot. The interesting part started when I tried the same...
How to create a typed dataset from an Xml file (2 replies)
microsoft.public.dotnet.xml
I want to create a typed dataset from an Xml File. A datatable will not allow me to set the column type after the datatable is created, as in the following example: DataSet myDataSet new DataSet(); myDataSet.ReadXml(MapPath("~/MenuXml.xml")); myDataSet.Tables[0].TableName "MenuTable"; myDataSet.Tables["MenuTable"].Columns[0].DataType typeof(Int32); //does not work So how can I create a dataset / d...
XmlSerializer instantiation problem: 'System.IO.FileNotFoundException by mscorlib.dll (3 replies)
microsoft.public.dotnet.xml
Hi, I am having problem instantiating XmlSerializer. The class (to which to deser) ParserPolicy (ParserPolicy.cs) is a public class. I am using Windows XP Professional. This has been discussed in this forum before. I have given user Everyone ALL permissions in the directory C:/DOCUME~1/ssarkar/LOCALS~1/Temp still the temporary DLL file is not found by 1q 3oal.dll mscorlib.dll .. Thanks, Soumen. En...
XmlTextWriter Issue (3 replies)
microsoft.public.dotnet.xml
I'm trying to get XmlTextWriter working. I have the code fragment below which compiles and runs, but the file is 0 length after it runs. I'm pretty new at this ... what's missing? Thanks for any help, Steve Harclerode [STAThread] static void Main(string[] args) XmlTextWriter xtw new XmlTextWriter("C:\\Temp\\xmltest.xml", null); xtw.WriteStartDocument(); xtw.WriteComment("Test of XmlTextWriter."); ...
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