| Merge XmlDocuments or change node owners (2 replies) |
| microsoft.public.dotnet.xml |
| Hi All, How do you merge 2 XmlDocuments? How do you change the owner of a node? Ex. I want to clone a node and then insert into a different XmlDocument. Thanks in Advance. |
|
| Stripping redundant 'xmlns' declarations. (2 replies) |
| microsoft.public.dotnet.xml |
| Does any one know of a quick and easy way (hopefully one method call) to strip all the redundant namespace declarations (xmlns) that can build up on elements within the hierarchy? Thanks... Phil (New Zealand) |
|
| xsltransform.transform method o/p to a string (2 replies) |
| microsoft.public.dotnet.xml |
| Hi, Can anyone tell me how to send the output of xsltransform.transform method to a string. It supports only streams, so is there a way I can use a stream to write to a string? I don;t want the o/p to be written to a file. Any help will be highly appreciated. mahesh |
|
| pipelined transforms (2 replies) |
| microsoft.public.dotnet.xml |
| I have an application where it is desirable to "pipeline" a few XSL transforms, that is, the output of the first becomes the input to the second, etc.(Yes, I could try to combine them all into one, but there are other reasons why breaking them up like this is desirable). I'm currently doing this by using the overload of Transform that takes an XmlDocument as input and produces an XmlReader as outp... |
|
| AddExtensionObject and properties (2 replies) |
| microsoft.public.dotnet.xml |
| Hi, Does anyone know how to access the properties of an object added with the AddExtensionObject function of the XsltArgumentList class? For instance, if I add an object with a Name property and a GetName function (that simply returns the Name), the following does not work: xsl:value of select "obj:Name"/ while the following does: xsl:value of select "obj:GetName()"/ The first construct just retur... |
|
| XmlSerialization & public constructor. (7 replies) |
| microsoft.public.dotnet.xml |
| Hi All, ..NET gurus help! :) I have a class library. I need to add XML serialization to it. I DO NOT want to have default public constructor as it will ruin the library idealogy. How can I use standar (XML) serialization provided by .NET and do not have default public constructor? Things I tried: 1. Used attribute [Serializable] on the class. 2. Implemented ISerializable interface. 3. Implemented ... |
|
| Newbie Help Please (3 replies, VIP) |
| microsoft.public.dotnet.xml |
| I understand the basics and theory of XML (listened to a few MSDN webcasts)....but I dont understnad how/where it is used. Does anyone know of any good tutorials, or any resources with practical examples? Thanks, Steve |
|
| IXMLSerializable Interface (4 replies) |
| microsoft.public.dotnet.xml |
| HELP! I am trying to customize XML serialization of some .NET objects for use in a web service. I have found some articles that indicate this can be done by implementing the IXmlSerializable interface, but I cannot find ANY documentation on this interface at all. I know that this is the way to go, but I don't want to have to "just figure it out". If anyone knows of ANY documentation on this interf... |
|
| " must implement a default accessor on SectionCollection" (2 replies) |
| microsoft.public.dotnet.xml |
| i am trying to Serialize a class which has a collection has a property. defined as [XmlElement(ElementName "Section",Type typeof(Section))] public SectionCollection Sections{ return sectioncollection } when i try to serialize i get this error. You must implement a default accessor on SectionCollection because it inherits from ICollection. The section collection is implemented after deriving from C... |
|
| XslTransform error through Com Interop (5 replies) |
| microsoft.public.dotnet.xml |
| I have written a small class that takes two filenames of an XML document and XSLT stylsheet as parameters and wrapped it up in a COM wrapper. When I call the function from a COM client I get an COM exception reporting a System.Xml.Xsl.XsltCompileException error with what appears to be the line numbers from the stylsheet. If I run the class by itself through a test application also written in C#, i... |
|
| XMLValidatingReader (4 replies) |
| microsoft.public.dotnet.xml |
| Hi, I'm trying to get a better understanding of the XMLValidatingReader. I have an XML, an XSD, and an ASP.NET program that uses the XSD to validate the XML. That all works fine, but there are a couple of things I'm curious about. I've written the ASP.NET code so that it gives me an output of the node type, the name of the node, the datatype of the value inside the node and then the value. Here ar... |
|
| Customize WSDL Files Generated By VS.NET (2 replies, VIP) |
| microsoft.public.dotnet.xml |
| I want to tailor the xml schema in the SOAP request portion of aWSDL file because the one auto generated by Visual Studio.NET is not specific enough for my web service. Does anyone know how to either customize the auto generated WSDL file, or if that's not possible, to change the link on the asmx page to a WSDL file I've created manually. Or do you have any suggestions for a better way to achieve ... |
|
| compress xml output (2 replies, VIP) |
| microsoft.public.dotnet.xml |
| Hi! I have a dataset that i want to write xml info using the writexml method, the problem is that the result output if very big, from a 600kb of text input a get an 7MB of xml output. It wouldnt matter to much, but the output should be sent via E mail and it's too big for it. is their a way to compress inside .NET the output thus decreasing the size of the output file. i prefer not envolving ZIP p... |
|
| How to store HTML inside XML node? (2 replies) |
| microsoft.public.dotnet.xml |
| In the following code snippet, I am trying to store an entire HTML document inside an XML node, but it doesn't work: strxml " ?xml version \"1.0\"? a:InfoPage xmlns HTMLStuff " HttpUtility.HtmlEncode(strhtml) " /a:InfoPage "; XmlDocument xd new XmlDocument(); xd.LoadXml(strxml); The above code basically chokes on quotes and other special characters. Is there a more robust way to keep HTML data in ... |
|
| where is my parameter gone? (2 replies, VIP) |
| microsoft.public.dotnet.xml |
| Hi there, I am trying to call a web service using Mozilla's new SOAP capabilities. The web service is called isPrime and resides in http://localhost/Primes.asmx, namespace is set to http://tempuri.org/. One integer parameter is expected, called "number". Now when I call this using JS, the following SOAP call is sent to the server: env:Envelope xmlns:env "http://schemas.xmlsoap.org/soap/envelope/" ... |
|
| endless loop (2 replies) |
| microsoft.public.dotnet.xml |
| when I try to run the following code I can not go to the next attribute of the node and therefore I go into an endless loop. MSXML2.DOMDocument Dom; MSXML2.IXMLDOMNode Node; Dom new MSXML2.DOMDocument(); Dom.loadXML(XML); Node Dom.selectSingleNode("User"); foreach(MSXML2.IXMLDOMAttribute Attr in Node.attributes) { switch(Attr.name.ToString().ToLower()) { case "id": iD Attr.value.ToString(); break;... |
|
| appendChild problem with different documents (2 replies) |
| microsoft.public.dotnet.xml |
| Hi, I have two XML documents 1. Root Test id "1" / /Root 2. Document Test id "2" / /Document I wish to end up with the following Root Test id '1' / Document Test id '2' / /Document /Root So I tried the following code (which works fine using VB6 and MSXML4) Dim oTest1Document As New XmlDocument() Dim oTest2Document As New XmlDocument() oTest1Document.LoadXml(" Root Test id '1' / /Root ") oTest2Docu... |
|
| XmlTextWriter Support WriteBase64 (2 replies) |
| microsoft.public.dotnet.xml |
| Hi, I am working with some binary data.i have stored the binary data into a byte array and now i am trying to save the binary information to the xml document. Problem: when i am using xmltextwriter to write with help of this method writeBase64 its not saving the byte array into the xmldocument. Please help me out. (How to store binay data into a xml document.) Note: One strange fact is when i am u... |
|
| Retrieving XML from a Stored Proc (2 replies) |
| microsoft.public.dotnet.xml |
| The method that executes Stored Procedures in my application is giving my an error... This is what I have... .... SQLcmd new SqlCommand("MyStoredProc", dbConn); SQLcmd.CommandType CommandType.StoredProcedure; dbConn.Open(); System.Xml.XmlReader myXmlReader SQLcmd .ExecuteXmlReader(); ERROR .... I get the following error... "A dataReader is already assign to this connection..." So I tried the examp... |
|
| XML schema worked in Beta2 (3 replies) |
| microsoft.public.dotnet.xml |
| This XML worked fine under Beta2, but can't get it to work on release version. Actually I can, by removing the schema entirely and use XMLReadMode.InferSchema. I would like to have the schema in though to read it. I am reading this from a file and binding it to a DataGrid. Appears not to be reading properly, get an error that SelectedIndex is out of range. Any help would be appreciated. Thanks. Mi... |
|
| XPath Query Result as Data Source (2 replies) |
| microsoft.public.dotnet.xml |
| Hi, Does anyone know how to use the result (say, nodeList, etc.) from XPath Query as the data source for a Server Control (such as DataGrid or DropdownList, etc.)? I am trying the XPathNavigator. XPathDocument doc new XPathDocument("booksort.xml"); XPathNavigator nav doc.CreateNavigator(); String expr "descendant::book[author/last name 'Austen']"; XPathNodeIterator iterator nav.Select(expr); // TO... |
|
| XmlTextReader can't read from URL. Help! (3 replies) |
| microsoft.public.dotnet.xml |
| Hi there, I can use XmlTextReader to read with: 1) XmlTextReader myReader new XmlTextReader("http://localhost/test.xml"); 2) XmlTextReader myReader new XmlTextReader("http://www.abcdefg.com/test.xml"); 3) XmlTextReader myReader new XmlTextReader(@"c:\test.xml"); But i CANNOT use it to read urls like this one: XmlTextReader myReader new XmlTextReader(http://10.83.8.36:8000/admin.cgi?pass wkingn&mod... |
|
| How to stream XML into XPathDocument? (3 replies) |
| microsoft.public.dotnet.xml |
| All, Here is what I am wanting to be able to do: Dynamically build an XML document in memory and then transform this with an XSL stylesheet that is stored on disk. I can build an XML document using the XmlTextWriter class. I can transform a XML document from disk using the XslTransform and XPathDocument classes. But how do I combine the two? I can pass an XmlReader to XPathDocument's constructor, ... |
|
| Exception Serialization Question (2 replies) |
| microsoft.public.dotnet.xml |
| Can anybody tell me why the following code fails. Dim oXmlSerializer New XmlSerializer(GetType(Exception)) ' Fails here Sample test code follows: Imports System Imports System.Text Imports System.Xml Imports System.Xml.Serialization .... Private Sub SerializeException(ByVal poExp As Exception) Dim oXmlSerializer New XmlSerializer(GetType(Exception)) ' Fails here Dim oStringWriter New StringWriter(... |
|
| Another newb question about XPathDocument and XmlTextWriter (2 replies) |
| microsoft.public.dotnet.xml |
| I'm building an XPathDocument by first building my XML using the XmlTextWriter streaming to a memory stream. This works fine when I am only adding 1 element to my XML. When I add more than one element, I get the System.Xml.XmlException when I try to build my XPathDocument. This is the pseudo code for building my XML.: writer.WriteStartElement("Vehicle"); writer.WriteElementString("VIN",VIN); write... |
|