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 > march 2007

Filter by week: 1 2 3 4 5

Illegal characters in path
Posted by GaryDean at 3/30/2007 2:51:52 PM
I'm getting an XML dataset from a web service passed as a string. I then do XmlDocument myXmlDoc = new XmlDocument(); myXmlDoc.Load(mystring); This causes an exception: Illegal characters in string. the string contains <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<validate>\n\t\t\t\t\t<er...more >>


XML/SOAP Serilaiztion and Generic Collections
Posted by DXRick at 3/29/2007 3:34:04 PM
I have a class (UserAccount) that uses a List<T> to contain a collection of Account classes. The Account class uses a List<T> to contain a collection of the account items. If the Account class is a checking account its List<> collection contains instances of the CheckItem class, which repres...more >>

How to use xmlwriter to add an attribute to any element?
Posted by darrel at 3/29/2007 11:45:14 AM
I want to make my XML as such: <parentItem> <childItem attribute="myAttribute">myContent</childItem> </parentItem> I thought I could just do this: objXMLWriter.WriteElementString("childItem", "myContent") objXMLWriter.WriteAttributeString("attribute", "myAttribute") But...I get an ...more >>

What versions of XSL are supported by what versions of ASP.net?
Posted by darrel at 3/29/2007 9:31:20 AM
At the moment, I'm doing some XSLT (1.0) work in ASP.net (1.1). There's some features I'd like to use that apparently are found in XSLT 2.0. Does ASP.net 1.1 support XSLT 2? What about ASP.net 2.0? EXSLT was also mentioned. Does ASP.net support that? -Darrel ...more >>

Trying to read XML file into dataset
Posted by Tony Girgenti at 3/28/2007 6:08:10 PM
Hello. Developing a web site in VS2005, SP1, VB, .NET 2.0, ASP.NET 2.0 on XP Pro, SP2. I eventually want to use a gridview table to view xml data, but right now i can't seem to get my xml data into a dataset so that i can use it. I have an XML file and can open it in IE. There is no XSD...more >>

Dataset Merge / getchanges just adding records?
Posted by Bmack500 at 3/28/2007 6:57:43 AM
I'm using the following subroutine. The two different XML files are identical with the exception of three additional records in the second one. One has 450 records, and the other has 453. After merging, I get 903 records. I guess what I expected was 3 records; just the differences in the two. T...more >>

Default attributes from DTD while transformation
Posted by mahesh.nimbalkar NO[at]SPAM gmail.com at 3/26/2007 1:04:02 PM
When I transform XML, XSLT automatically adds extra attributes to the node which are declared in DTD (default DTD attributes) . I just want XSLT not to add these extra default attributes from DTD. See refname and shortname attributes are added to node automatically after transformation. Ple...more >>

Errror Help: character ' ', hexadecimal value 0x2 is illegal in xml documents
Posted by raj at 3/26/2007 10:24:45 AM
what does this error mean? how can i fix this? thanks, raj ...more >>



Problems with XsdObjectGen
Posted by Veerle at 3/26/2007 12:59:57 AM
Hi, I am experiencing a lot of problems with XsdObjectGen. I downloaded the latest version from http://www.microsoft.com/downloads/details.aspx?FamilyID=89e6b1e5-f66c-4a4d-933b-46222bb01eb0&DisplayLang=en but this is dated september 2006, so it's not very recent. We receive xsds from a thir...more >>

XSD newbie: Element based choice.
Posted by BLUE at 3/23/2007 10:30:00 PM
Suppose I have an XML file like this: <type>...</type> <positionID>...</positionID> <category>...</category> I want to specify in my XML Schema that: - if "type" is "One" I must have <positionID>A_STRING</positionID> - if "type" is "Two" I must have <positionID>...more >>

SelectSingleNode returns nothing. Namespace manager issue
Posted by need2scuba at 3/22/2007 2:27:10 PM
I have the following code snipet: .... _xmldocManifest.Load(strManifestAbsolutePath) Dim manifestNSManager As XmlNamespaceManager = New XmlNamespaceManager(_xmldocManifest.NameTable) manifestNSManager.AddNamespace(String.Empty, "http://www.imsproject.org/xsd/imscp_rootv1p1p2") manifestN...more >>

XMLSerializer - Controling Order of Object Properties
Posted by Phil Galey at 3/22/2007 2:12:46 PM
If you're using XMLSerializer to serialize a class object to XML, is it at all possible to control the order in which the object properties are presented in the XML file? ...more >>

MSXML6 C++ VS2005: parsing "set" of nodes (& child nodes)??
Posted by j.a. harriman at 3/21/2007 11:09:15 AM
Hi, I've looked at a number of examples in the MSXML6 help, but haven't been able to find exactly what I'm looking for. I have the following loaded into a "IXMLDOMDocument2" object. I have a CString sString that I would like to check to see if it matches one of the "Descriptions" below. ...more >>

Compare two XML Files and save to One
Posted by lewis76 NO[at]SPAM gmail.com at 3/20/2007 10:57:53 PM
Hi all, I feel like this question has been asked before but I just cannot seem to find a good answer. Q: Is there a way to have two XML files and compare them and save them to one. Example: XML-A: <Season> <Fruit>Orange</Fruit> <Fruit>Strawberry</Fruit> </Season> XML-B: <Seaso...more >>

Referencing Additional Namespaces XSL
Posted by SR at 3/20/2007 12:09:56 PM
I need to use a string replace function in my XSL document. I found a W3 library that has numerous string functions such as fn:replace(). When I try using the namespace, I get an error "Cannot find the script or external object that implements prefix 'http://www.w3.org/2005/02/xpath-funct...more >>

Looping through XmlNodeList
Posted by Raul at 3/20/2007 10:22:12 AM
Hi, I have the following code, which picks up 43 different nodes from my XML document XmlNodeList amortNodes = amortDoc.SelectNodes("// TValueAmortizationSchedule/AmortizationLine"); each node looks like this: <AmortizationLineType>8</AmortizationLineType> <Date>09/01/2006</Date> <Lo...more >>

how to apply xslt within xml to that using .NET
Posted by RccH at 3/20/2007 4:57:04 AM
Beginner using xslt... So. I have an XML file which has a link into xslt file like following... <?xml version='1.0' encoding='utf-8' ?> <?xml-stylesheet type="text/xsl" href="transform.xsl"?> <customers> rest of the xml.... So How, using C# or VB.NET do I apply that xsl file into this same ...more >>

XmlReaderSettings ValidationEventHandler Firing Twice
Posted by Techno_Dex at 3/19/2007 4:19:45 PM
I have an issue with the EventHandler for the XmlReaderSettings object being called twice during validation and I'm a little stumpped as to why. The error message being given is the same error message both times. This is an intentional error that I have introduced into the XML file to test m...more >>

Binding ASP.NET Menu to XML
Posted by dvomsaal NO[at]SPAM ddrtech.com at 3/19/2007 2:04:45 PM
I have created a XmlDocument that contains the exact layout that siteMap uses, and then I bind my Menu object to it: Dim xml As XmlDocument xml = DirectCast(Session("MenuData"), XmlDocument) Dim xmlDS As New XmlDataSource() xmlDS.Data = xml.OuterXml ...more >>

Web 2.0 List
Posted by Anoop M at 3/19/2007 12:00:00 AM
Here is a comprehensive list of web 2.0 sites - http://web2trends.blogspot.com/search/label/Web%202.0%20Directory ...more >>

Node Type both Element and Text
Posted by Kevin at 3/18/2007 5:09:06 PM
I have an XML node that has both attributes and text. I am having difficulty getting the xmlreader to deal with this. Sample XML Node: <HomePhoneNumber Attribute1="Y" Attribute2="Y" Attribute3="Y">(425) 555-1212</HomePhoneNumber> I'd like to iterate on this and output the node's path, na...more >>

Saving .csproj files
Posted by Al Pilon at 3/16/2007 10:03:03 PM
Any help would be appreciated for the following problem. I've already spent a day at this, and enough is enough. I'm writing a ORM program. and in the process of running it against a database, I'm creating dozens of classes. I want to insert these classes into the .csproj file automatically. ...more >>

XML file loaded and stored as cached dataset?
Posted by doug at 3/15/2007 3:59:08 PM
Have loaded balanced web servers that we do not allow to connect to our database. Content is created and pushed to these sites. I want to add a web service that may get multiple requests a second depending on peak access. I have built an XML file from SQL DB and pushed this file to web serv...more >>

Redundant xmlns attribute
Posted by Greg at 3/15/2007 1:51:19 PM
If I have an XmlDocument with a deep hierarchy of nodes, with a documentElement having an attribute xmlns="http://someurl.com" and all children inheriting that namespace (but not having the xmlns attribute explicitly declared), then why is it that when I perform appendChild(someNode) on an e...more >>

Trouble with XPath query
Posted by tschulken at 3/15/2007 12:14:36 PM
I have a query where i need to look for a value of a lower level xml element based on the value of a parent element existing first. Here is a simple example of the xml <S3Client> <Buttons> <Button>Activity <RestrictedClientType> <ClientType>...more >>

Xpath query fails to return a node
Posted by Amir at 3/15/2007 9:32:23 AM
Hi I am trying to extract a node from the following XML doc <?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> ...more >>

xsd.exe generating multiple enums for simple type of included schema file
Posted by olympus_mons NO[at]SPAM gmx.de at 3/15/2007 9:18:44 AM
Hi, I'm just discovering the power of xsd.exe, so maybe I'm doing something wrong. >From an external provider of a web service I received several xsd schema files describing requests and responses. So there is an extra xsd file for each response and each request as well as some base schema...more >>

what encoding does system.xml.xmldocument.save(string path) use to save the xml document if there is no <?xml... in the front of the xml document?
Posted by Daniel at 3/14/2007 9:13:25 PM
what encoding does system.xml.xmldocument.save(string path) use to save the xml document if there is no <?xml... in the front of the xml document? ...more >>

Problem with XmlNode.ChildNodes across different machines
Posted by The Man From SQL at 3/14/2007 2:42:03 PM
I'm having the darndest XML config file problem that I really need help with. I'm supporting a .NET 1.1 desktop application with its own config file, and I implement IConfigurationSectionHandler so I can have a custom config section in my config file. The IConfigurationSectionHandler.Creat...more >>

populate dataset fk value using xmlschema xsd
Posted by chudq NO[at]SPAM hotmail.com at 3/14/2007 12:40:46 PM
I am trying to use xml shema to load xml file to a dataset. Here are two tables: Table Item: Item_ID (key) Name Category_ID (foreign key from table Category) Table Category: Category_ID (key) Description I set relationship between 2 tables as commented above Here is a par...more >>

MSXML6 C++ unable to locate node
Posted by j.a. harriman at 3/13/2007 10:15:20 AM
Hi, I am new to using the MSXML functions in C++. I found this on MSDN as an example of what I wanted to do, http://msdn2.microsoft.com/en-us/library/ms765465.aspx. I have tried a number of XPATH examples to try and retrieve the "><Code>12455</Code>", but have been unable to do so. The M...more >>

Can't get encoding="iso-8859-1"
Posted by David Thielen at 3/12/2007 10:30:44 AM
I do the following: StringBuilder xml = new StringBuilder(); XmlWriterSettings xws = new XmlWriterSettings(); xws.Encoding = Encoding.GetEncoding("iso-8859-1"); xws.Indent = true; XmlWriter xtw = XmlTextWriter.Create(new StringWriter(xml), xws); .... But the xml it creates ...more >>

Serializing Class with Unqualified Root Element and Default Namespace attribute
Posted by Mark Olbert at 3/11/2007 5:04:10 PM
I'm trying to serialize (using XmlSerializer.Serialize) a class that I generated from an XSD schema using XSD.EXE /c. The problem I'm running into is that the root element needs to be unqualified, and the default namespace needs to be included on it as an attribute. The schema I'm using is this:...more >>

XMLNode - XMLDocument types question
Posted by GaryDean at 3/10/2007 12:25:10 PM
I have a web service method that returns an XMLDocument. The signature is: public XmlDocument GetPOs() The following client code calls this method but it accepts an XMLNode instead of an XMLDocument and my first question is why does this work? XmlNode neNode; neN...more >>

"Root element is missing" xml stream problem
Posted by lisa.bogart NO[at]SPAM eds.com at 3/8/2007 6:29:27 PM
I am getting a "Root element is missing" error when I try to load a stream into and XmlDocument. Can anyone help me with what I am doing wrong??? Dim xmlTextWriter As XmlTextWriter = Nothing Dim objFile As FileStream = Nothing objStream = New MemoryStream() xmlTextWriter = New System....more >>

Validate xml instance against schema
Posted by JoeZ at 3/8/2007 4:07:57 PM
Hi all, I am using XMLValidatingReader to validate xml instance against schema. Now my question is: in the schema, it has the target name space. In the instance, it doesn't have the name space. I can not add the name space into the instance, if I could do that I won't have any problem. ...more >>

Performance issues with XMLTextReader
Posted by Frank Schumacher at 3/8/2007 3:10:37 PM
Hi there, I need to parse a lot of html-files from wikipedia, and I need to do it as fast as possible. So I started a little testing with XMLTextReader, but the results I get confuse me. It seems that the Reader ALWAYS needs about 1 second for the first textReader.Read() Here's my testco...more >>

Fastest way to load an xml file into an array in .net
Posted by Jörgen Ahrens at 3/8/2007 12:00:00 AM
Hi All VS 2005 SP1 (C#, VB.NET) I need the absolut fastest way of loading an xml-file of about 700KB into an array. I need to load about 1500 of those xml-Files into arrays on startup of my application. Therefore it needs to be as fast as possible. Please also tell me if the xml struc...more >>

Still one question!
Posted by Jo M at 3/7/2007 8:56:40 PM
Hello again! I wrote a small Windows App that converts characters to XML. Code below: StringBuilder sb = new StringBuilder(); new System.Xml.XmlTextWriter(new StringWriter(sb)).WriteString(this.txtBoxFrom.Text); this.txtBoxTo.Text = sb.ToString(); If I give & to txtBoxFrom field ...more >>

Regular Expressions to XML
Posted by Jo M at 3/7/2007 6:43:20 PM
Hello, Does anyone of you know any tool that would convert regular expressions to XML compatible form? I mean tool that would convert e.g. & to &amp; etc. I have written an ASP.NET C# application that uses regular expressions stored in XML file but a tool that would convert Regexp to XML ...more >>

Closing a file with XmlDocument?
Posted by SirPoonga at 3/6/2007 11:17:30 AM
I am storing some small amounts of data in an xml file using XmlDocument. I basically do a .Load(filename), processing, then .Save(filename). However, once and awhile on the .Load it will say the file is in use by another process. This is the only program to use that file. I am using C#. An...more >>

Read XML using XSD
Posted by Ben van Erp at 3/6/2007 9:10:05 AM
Somebody gave me an XSD file to read a XML file. Can somebody give me an idea how to use this XSD file in C# to start reading XML files? Thanks, Ben...more >>

Is this a problem with / or . within the data values?
Posted by JB at 3/5/2007 4:40:34 PM
Does anyone know why this code works in example A but not in example B ? Is this a problem with special characters within the data values? A) Set xmlNodeList = xmlParentNode.selectNodes("//PredecessorLink[CrossProjectName='A5']") B) Set xmlNodeList = xmlParentNode.selectNodes("//Prede...more >>

using XmlTextWriter
Posted by gusse.net at 3/5/2007 3:16:24 PM
if there are no data when writing an element is creates the tag like this <customer/> but i would like it to write <customer> </customer> any property i can set or something else i could do ?? ...more >>

XML , text, from xmlwriter.
Posted by MAF at 3/5/2007 12:10:01 PM
Is there a simple way to get the text, xml, from an xmlwriter. I have a XML writer that writes to a file, and I want another function to return the text that the xml writer is produced. Any suggestions? ...more >>

Reading XML Webpage Without XSLT
Posted by dakrin at 3/5/2007 10:07:16 AM
i'm trying to programatically read the xml that is used to create a webpage through xslt transformations. I can view the XML when i go to "View Source" in internet explorer, but whenever i try to download the webpage programmatically i can't ever get the source XML, i always get the transforme...more >>

Load the restrictions from a schema
Posted by Robert Mago at 3/5/2007 12:00:00 AM
I have an xml document instance in C# which loads an xml schema. I would like to load the restrictions for a complex type in the schema so that the user will choose one, from a drop down list for example. Any ideas? A stripped down schema segment is shown below: <xs:complexType name="c...more >>

Storing EndElements as XmlNodes
Posted by ahmed.maryam NO[at]SPAM gmail.com at 3/4/2007 5:39:35 PM
Hi Everyone, How can I check for end elements in a XmlNodeList that consists of all the children nodes in my XML document? Can I avoid using XmlReader or XPath Navigator? Thanks for any help! I'm using Visual Studio 2005 and my application is in C#. ...more >>

Xpath with Namespace retruns NULL, please help
Posted by jeff_gombala at 3/2/2007 3:25:59 PM
I am using the following code to query for a single node, yet my results are always NULL. Please help, I've tried everything adn I am unable to get a result. XmlDocument xml = new XmlDocument(); xml.LoadXml(strNLETSMessage); XmlNamespaceManager nsmgr = new ...more >>

Splitting and Renaming Xml Nodes
Posted by Guhanath at 3/1/2007 6:35:11 AM
Hi, Please suggest a solution for the following problem. We get a input xml that need to be processed for grouping and sorting. The example of one such xml <Requests> <Request> ...... <Results> <Result1> <Type>1</Type> </Result>...more >>


DevelopmentNow Blog