Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
all groups > dotnet xml > june 2005

Filter by week: 1 2 3 4 5

XmlSerializer XmlTextWriter UTF8 and Bad Characters
Posted by rmgalante NO[at]SPAM yahoo.com at 6/30/2005 2:18:40 PM
I have a Windows Service that reads and writes an XML file to disk periodically. I use the XmlSerializer to serialize and deserialize the XML file on disk. I am writing the file using an XmlTextWriter and UTF8 encoding. I notice after long periods of time that my file has bad, non-displayable...more >>


XML with chinese character problem
Posted by Agnes at 6/30/2005 12:00:00 AM
In my .net ,i need to generate an xml file , however, user may input a chinese character, Then , the xml will got something unknow characters. the following is my code, Does anyone know how to solve it ?? Private Sub Init() With AMSXML ..Formatting = Formatting.Indented ..Indentation = 4 ....more >>

strategies for making elements unique
Posted by Lisa at 6/29/2005 11:58:01 PM
I have to work with an existing xml where there is a root element and all other elements are children of the root (in other words there is no nesting or hierarchy), e.g. <myroot> <A>adata</A> <B>bdata</B> <C>cdata</C> <A>otheradata</A> </myroot> Unfortunately there are a lot of ...more >>

xml element's schema context
Posted by Jan Limpens at 6/29/2005 12:43:53 PM
Hi, given a schmea and the currently selected element (via XPath) of a XmlDocument that uses this schema, I want to allow a xml editor to give the user a choice of possible ChildNode Elements. Pretty much the way Visual Studio's Xml intellisense works. I am quite unsure, which path to take....more >>

Create a .net 2.0 settings file problem
Posted by Danny Springer at 6/29/2005 7:44:04 AM
I am trying to create the following xml file with VS 2005: <?xml version='1.0' encoding='utf-8'?> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="" GeneratedClassName="Extra"> <Profiles> <Profile N...more >>

Xml Binding Question
Posted by Raed Sawalha at 6/29/2005 6:13:04 AM
the first thing I searched the internet is what is the XML Binding? also while I;m reading the eSCORTE4js for SCORM i noticed the following comment // these functions handle the conversion to/from the IEEE 1484_11_3 XML binding values what this means? ...more >>

XML datasource
Posted by Stanislaw Tristan at 6/29/2005 12:00:00 AM
SSBoYXZlIGEgVlMgMjAwNSBiZXRhLg0KSG93IEkgY2FuIGNyZWF0ZSBhIFhNTCBkYXRhc291cmNl IGluIGRlc3Vnbi10aW1lPw0KDQotLSANClN0YW5pc2xhdyBUcmlzdGFuDQpJUCBQcm90ZWN0aW9u DQpLeWl2LCBVa3JhaW5lDQpFLW1haWw6IGFkbWluQHplc3RhZC5jb20NCldFQjogd3d3Lnplc3Rh ZC5jb20= ...more >>

parse string with xml contents
Posted by Mochuelo at 6/28/2005 12:22:57 PM
Hi I have a string with the following contents: "<TR align=right ID=G><TD align=left><A HREF="/comun/fichaemp/fichavalor.asp?isin=ES0111845014"><IMG SRC="/images/arr-up9.gif" BORDER=0> ABERTIS SE.A</A></TD><TD>19,96</TD><TD ID=V>0,15</TD><TD>19,96</TD><TD>19,83</TD><TD>1.060.525</TD><TD>21...more >>



XML in VS.Net 2K5 vs VS.Net 2K3
Posted by SideByEach at 6/28/2005 6:43:28 AM
I just started using VS 2K5 beta 2 the other day. I am trying to move a project I created over to in pieces to 2K5. I can't seem to figure out why the follow XPath returns nothing in 2K5 "descendant::element[@ref='CurrDate']". The XML I am trying to select from is as follows: <?xml version=...more >>

Creating XML Element
Posted by Raed Sawalha at 6/27/2005 10:11:03 PM
I'm trying to create Element as following name MyElement:InitialName XmlElement elem = doc.CreateElement("MyElement:InitialName"); when generate the XML the tag is truncated as ONLY "MyElement",why? Any Suggestions ...more >>

Element or Attribute, which one should I use. thanks!
Posted by davidw at 6/26/2005 9:37:50 PM
I need store some setting in XML. I can not decide to use xml element or xml attribute to store them, for example, the XML could be <Page> <Label>test</Label> <Size>10</Size> ..... </Page> and it could be <Page label="test" size="10"/> I read some articles. Most them suggest element...more >>

XSLT or define relations
Posted by womber at 6/26/2005 3:33:03 PM
What do you think is the best design approach when your trying to get nested XML results from dataSet.GetXML. Define the relations in the dataset or apply an XSLT stylesheet to nest the results by syncing the dataset with an XMLdocument? ...more >>

XML Serialization and custom collections
Posted by womber at 6/26/2005 12:03:07 PM
I am getting XML from a dataset that has been populated via a storedprocedure no schemas have been applied nor any relationships. But the correct table names have been given to match the table(s) equivalent business object(s). I have a custom collection that implements ICollection and IEnumera...more >>

Should I seriize xml or I should just leave it as text? thanks
Posted by davidw at 6/25/2005 10:22:22 PM
Last time, I asked a question about if a XPathDocument could be serialized. Actually what I really want to know is how should I do in this case: I have a class that will be serialized. In the class, I need call another class, which will read setting from database. I want to load the xml once a...more >>

XML base64Binary
Posted by Sheila at 6/25/2005 8:05:01 PM
Hi, I have a web service which stores an uploaded image into SQL server, thus there are a few things need to do: 1. Convert image to base64Binary. 2. Call web service and embed image as base64Binary in XML string. 3. Web service save image binary into SQL. Where can i find the samples. Is...more >>

xslt Transform efficiently
Posted by Doug Heeren at 6/25/2005 5:59:03 AM
I have the following section of VB.NET code that transforms a simple dataset into an Excel xml workbook. It works fine for < 50 rows or so, but I have about 8,000 rows I need to transform. Is there a better way than what I am doing. This is part of an ASP.NET applicaiton. 'Clear the...more >>

XSL transform bug...
Posted by tcdevelopment at 6/24/2005 5:56:01 AM
I have a XSLT file that gives expected results when I transform using MSXML V4.0 in a simple vbs file. However when using XslTransform in dotnet, I do not get the same results. The part of the XSLT file that does not work correctly is: <Token TokenId="3129"> <xsl:for-each select="EDI/Segme...more >>

Problem XML with (à,è)
Posted by Peppe at 6/24/2005 12:00:00 AM
When i export a an XML from a dataset, i have a problem with the accented characters (es. à;é;ì etc) I know that XML doesn't use it. I should use a particular encoding? how can i convert this characters? Exists a function for convert? ...more >>

'' is an invalid QName
Posted by Glenn at 6/23/2005 12:00:00 AM
Help I'm trying to perform a transform and I keep on getting '' is invalid QName. The weird thing is, I can take the same code, stylesheet and XML, put into a Console app and it works okay. I've tested the stylesheet in Stylus Studio and tried using nxslt and both work fine. Any ideas? ...more >>

XSD + DataSet = XML!?!
Posted by MartinP at 6/23/2005 12:00:00 AM
Hi There. I've been doing a little research, but found little of value. My problem's this: I've got a DataSet containing a serious bunch of data. From this DataSet I want to "extract" some of the values (values in specific datatable columns). I've got an XSD which has the right syntax for ...more >>

skipping invalid nodes with XmlTextReader
Posted by Stephen S Kelley at 6/22/2005 5:24:30 PM
I want to do something like: bool bContinueReading=true; XmlTextReader Reader=new XmlTextReader("file.xml"); while(bContinueReading) { try { Reader.Read(); ... } catch { Reader.Skip(); } } To skip over any xml formatting problems (in...more >>

How do I control the location of xmlns attributes when serializing
Posted by rlcavebmg at 6/22/2005 10:17:03 AM
I need to generate an XML document that will be validated against a DTD. Up to this point, I have been using XML Serialization with good results, but there is one item I haven't been able to figure out. The generated XML needs to look something like this: <?xml version="1.0" encoding="utf...more >>

Retrieving values from XML file
Posted by Mike at 6/22/2005 12:00:00 AM
I want to be able access an xml file using an XPath? query to go to a specific node. Once I have that node I want to be able to retrieve the value of an attribute. Can't seem to get this working using the 2.0 Framework. Here's a sample of the XML <Agency> <vu_Agency AgencySysNo="1" Name=...more >>

Deserialize empty XML element (VB.NET)
Posted by mcollier at 6/21/2005 7:58:39 AM
I'm having some trouble figuring out how to deserialize an empty XML element in VB.NET. Let's say I'm trying to deserialize XML such as: <Order> <OrderRefNumber/> <Customer>Bob</Customer> </Order> I would then have a simple entity object to represent the XML data. That object would hav...more >>

Long duration of call XmlDataDocument.CloneNode
Posted by Petr Felzmann at 6/21/2005 2:11:01 AM
Hi, why the duration of call the CloneNode(true) is steadily increasing? First call is 0.004s and 100th is 0.16s! XML file is 5kB only, no disk swap. XmlDataDocument xml = new XmlDataDocument(); xml.Load(@"C:\foo.xml"); for(int i = 0; i < 100; i++) { XmlNode node = xml.CloneNode(true); ...more >>

XML - all its cracked up to be?
Posted by mikeb at 6/20/2005 2:43:47 PM
This is an honest question, no sarcasm intended. I'm really curious, what -is- the big deal about XML? I'm heaing all sorts of things such as an open standard that can be read across all platforms, etc. But really, my colleagues are insisting that we transfer large chunks of data using XM...more >>

How can I generate a user friendly error message when validating XML against a schema?
Posted by Joakim Olesen at 6/20/2005 12:00:00 AM
Hello When validating xml against a schema, the most frequent error I get is something like "The 'FOO' attribute has an invalid value according to its data type. An error occurred at , (25, 913)". That error message is not very user friendly, so I'd like to extract the data in the failing ...more >>

What am I doing wrong part 2?
Posted by steve bull at 6/17/2005 2:26:59 PM
I thought I had figured it out. But, I am only half way there. Now I have the following code snippet to read the colorRange attributes for the colorRangeSwatch in the xml file listed below. string expr = "/swatches[colorRangeSwatch='All Red Colors']/colorRangeSwatch/colorRange"; ...more >>

Web Service Timeout Parameter
Posted by dayblue at 6/17/2005 1:42:06 PM
My question has to do with the process of calling web services. Typically when the client calls a web service they can specify the timeout for the call. My question is how the actual web service or individual method can police this parameter so as to maintain better control. Some of the w...more >>

What am I doing wrong?
Posted by steve bull at 6/17/2005 11:57:06 AM
I have the following code snippet to read the colorRange attributes for the colorRangeSwatch in the xml file listed below. string expr = "swatches[colorRangeSwatch='All Red Colors']"; XmlElement crsElement = (XmlElement)m_colorRangeSwatchDoc.SelectSingleNode(expr); bool fr ...more >>

return illegal xml characters from a web service
Posted by Michael Lopez at 6/17/2005 6:10:02 AM
I've written a small web service in c# that takes in a plaintext string, encrypts it, then returns the encrypted string. Some of the characters returned by encryption are illegal xml characters and causes an error when trying to consume the service coldfusion(axis). The service works fine when...more >>

Can I add new nodes to an XPathDocument?
Posted by steve bull at 6/17/2005 12:43:16 AM
I have an XPathDocument which contains a list of color definitions. If I want to add a new color definition to, or delete an existing one from, the source xml file how can I force this to be reflected in the XPathDocument? Do I have to reload the XPathDocument? If so, would I need to dispose o...more >>

Empty Dataset Tables Don't Save to XML
Posted by Phil Galey at 6/16/2005 12:36:32 PM
How do you get around the problem of empty tables in a dataset not being included when you do a WriteXML? When you later read the data back into a new dataset, those tables are gone, because they never got saved to the XML file. Only tables containing one or more records get saved to the XML fi...more >>

XmlTextReader, parsing, space as data
Posted by kenneth NO[at]SPAM nospam.nospam at 6/16/2005 12:10:10 PM
I just ran across this. #1 <DBColumn> 1 </DBColumn> #2 <DBColumn> </DBColumn> The data for #1 will be parsed and returned as " 1 ". I get a sequence of Element/Text/EndElement. The data for #2 will not be returned. I get a sequence of Element/Whitespace/EndElement...more >>

XMLValidatingReader misses errors
Posted by Geoff at 6/16/2005 11:31:42 AM
I am using an XMLValidatingReader to validate an XML file received via a web service. I want to verify that the incoming file matches the XML schema. When testing the validation routine, the XMLValidatingReader correctly flags mis-matched tags such as <abc>some content</xyz> but does not catch...more >>

Transfroming wordml to cutom xml
Posted by Rahul at 6/16/2005 10:53:37 AM
Hi, I am converting wordml into a custom html. The converted xml is in UTF-8 fromat. But the special characters get garbled in conversion. For Example they show up as "â?"".. What needs to be done to avoid this. Thanks Rahul Aggarwal ...more >>

CSV to XML
Posted by Manoj at 6/16/2005 10:07:04 AM
Hi, I want to generate different XML files from one CSV file. For eample I want build the employee.xml which should contain the distinct list of employees from the CSV file. The CSV File contains employee name getting repeated multiple times based on the record type. Please suggest how can ...more >>

XML Validation with xsd of a generic node
Posted by kurotsuke at 6/16/2005 12:00:00 AM
Hi, I need to validate an xml which contains a tag called <Trigger> that contains a structure which I don't know and that I don't want to validate. How should indicate in the XSD file that the document can contain a tag caller <Trigger> but that I don't want to do any validation of its...more >>

Parsing XML Schema (C#)
Posted by Mike at 6/15/2005 2:20:14 PM
Hi! I have an Excel 2003 Schema I need to parse to extract elements names. I am puzzled with the System.Xml.Schema object. Here's the example of my schema: I need to get a collection of element names(TemplateB62,TemplateC62 ......) <?xml version='1.0' encoding='UTF-8'?> <xsd:schema targe...more >>

From DOM to an XML string
Posted by ChuckD_Duncan at 6/15/2005 1:00:59 PM
I know this is too easy for you heavy-weights but I am drowning in streams and writers ..., I have created an XmlDocument containing all my nodes and attributes. I just need to do something like: string XmlString = MyXMLDoc.MakeXmlString(); Ok... so what do I really have to do... I sta...more >>

XSLT Development Tools?
Posted by Teksure at 6/15/2005 9:32:13 AM
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about the development environment or recommend me some other that you know. XML IDE's - http://xslt-pro...more >>

Determining default namespace?
Posted by Andy at 6/14/2005 9:29:33 AM
Hi all, I have several Xml files, which at the root node change the default namespace, as below: <?xml version="1.0" encoding="UTF-8" ?> <rootNode xmlns="http://www.some.com/namespace/A" /> where A can be several different codes. I found in order to be able to SelectNodes, I needed to ...more >>

Finding nested elements in XSD
Posted by SideByEach at 6/14/2005 7:47:20 AM
I've got a schema loaded into a XmlSchema class. Via the elements collection I can see all the elements defiend at the root of the schema. How can I get the definition of a nested schema element? Thanks. ...more >>

xsd.exe cannot generate schema
Posted by PeterW at 6/14/2005 7:36:02 AM
I have an xml file from which I want to generate an xsd schema and at a later stage a cs class. The xml file has a mix of defined namespaces and also an empty namespace. These are defined as follows: <silcn:silcn xmlns:silcn='http://silcn.org/200309' xmlns='http://xmlprobe.com/200312'> i...more >>

.net code to compare 2 xml documents
Posted by Rasmus at 6/14/2005 5:06:02 AM
I've looked at XmlDiff, but can't use its output in my case. Therefore i'm looking for an alternative. I need at piece of code that can take 2 xml documents and tell me the differnces. Any ideas?...more >>

XmlDiff licence?
Posted by Rasmus at 6/14/2005 12:43:07 AM
I short: May I use the XmlDiff dll's from GotDotNet in production code i sell?...more >>

XmlSerializer & external XML document
Posted by Lloyd Dupont at 6/14/2005 12:00:00 AM
I get an XmlDocument from an external source. I want to load it/map it to C# class. I'm creating classes as I learn about the format. many tag are yet unparsed, but that seems ok for the XmlSerializer, great! Now here is my problem. let say my document conceptually map to classes like t...more >>

How do I write an XPath expression to retrieve data for this xml?
Posted by steve bull at 6/13/2005 4:31:12 PM
How do I write an XPath expression to read the color range node from the following xml file. I.e. where attribute = "All Red Colors"? The final file will have many more nodes in it. I realize this is probably very easy but the examples I have seen only indicate how to get a match for red, blu...more >>

XmlSerializer, XmlAnyElement and CDATA
Posted by Munish at 6/13/2005 11:10:03 AM
(VS.NET 2K3, C#) Hi, I need to serialize/deserialize an element using XmlSerializer that can contain any valid XML including a CDATA section. [XmlRootAttribute] public class Test { [XmlAnyElement] public XmlElement Anything; } This doesn't work with an XML like the following: <Test><...more >>

HTML formatting after applying XSL to XML
Posted by Simon M at 6/13/2005 7:25:05 AM
Hi, Hopefully someone can answer this; I am using aspx and c# to format XML using an XSL transform, the output is then written to the the response of the webform. When the page first loads the layout is not like it is described in the XSL... there is too much whitespace with gaps between th...more >>


DevelopmentNow Blog