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 > october 2005

Filter by week: 1 2 3 4 5

Difference between noditerator.movenext and...
Posted by darrel at 10/31/2005 3:25:00 PM
If I create a node iterator using an xpath expression pointing to a specific node, this will give me the value of that node: ni.movenext() ni.current.tostring However, this doesn't: ni.movenext.tostring why is that? I'm not exactly sure what that second line is actually doing. It ap...more >>


Getting a specific parent of any node via xpath navigation
Posted by darrel at 10/31/2005 1:26:07 PM
I am storing my site structure as such: <menuItems> <menuItem> <pageID>1</pageID> </menuItem> <menuItem> <pageID>2</pageID> <menuItem> <pageID>4</pageID> <menuItem> <pageID>5</pageID> <menuItem> ...more >>

Serialisation - To Display or Not to Display
Posted by dickster at 10/31/2005 6:26:34 AM
A general query Im serialising a person object with the following member variables Class Person Private _forenames As String Private _surname As String Private _dob As Date Private _marital_status As MaritalStatus 'Public Get and Set Properties h...more >>

Matching xsd:enumeration values with spaces in classes
Posted by Sergey Poberezovskiy at 10/30/2005 5:38:08 PM
Hi, I have a simple enumeration in my schema: <xs:element name="el_1"> <xs:simpleType> <xs:restiction base="xs:string"> <xs:enumeration value="value and space 1"/> <xs:enumeration value="value2 with spaces"/> ... </xs:restiction> </xs:simpleType> <xs:elemen...more >>

Generating the code to turn an XML schema into support for a datas
Posted by Al Christoph at 10/30/2005 10:16:06 AM
Please forgive me if this is the wrong place to post this. The last place I posted got me a fairly rude response. I guess vb.db people just don't want to think about XML as database. At any rate, here is what I posted: I have downloaded the final production version of VS 2005 pro after testin...more >>

need help on how to add comment to xml schema with C#
Posted by comic_rage NO[at]SPAM yahoo.com at 10/30/2005 9:58:08 AM
how do you add a comment line/section to an xml schema xsd file? like this <!-- =============================================================== --> <!-- =================== My comment line ======================== --> <!-- =============================================================...more >>

Serializing objects that reference other objects
Posted by cjmumford NO[at]SPAM gmail.com at 10/29/2005 3:42:37 PM
I have a couple of C# objects like this: class Foo { } class Bar { Foo m_foo; Foo foo { get { return m_foo; } set { m_foo = value; } } } What I get when these are serialized is a Foo element nested in a Bar el...more >>

XSLT Extension Objects and Node Sets
Posted by Matt at 10/28/2005 7:32:17 PM
I need help with passing a generated node set from a style sheet into my = customer msxsl extension. I have the following node set that I am = creating: <xsl:variable name=3D"sql"> <SQL> <StoredProc>spGetReconID</StoredProc> <Parms> <parm> ...more >>



Need help with xml schema to add documentation with elements
Posted by comic_rage NO[at]SPAM yahoo.com at 10/28/2005 4:08:57 PM
Hi, I am trying to add an annotation with a documentation, which contains several nodes. So far, I having a problem on how to code this with C#. Any help is appreciated. <xsd:annotation> <xsd:documentation> <Description>my description</Description> <Year>2004</Year> <Level>...more >>

xsd, how to...
Posted by Sergey Poberezovskiy at 10/27/2005 7:07:01 PM
Hi, I need to implement the following rule: Element el_1 is defined as follows: <xs:element name="el_1"> <xs:restriction base="xs:string"> <xs:enumeration value="value1"/> <xs:enumeration value="value2"/> <xs:enumeration value="value3"/> </xs:restriction> </xs:element> ...more >>

simpleType Question
Posted by Mike Logan at 10/27/2005 4:04:03 AM
Is this correct? I am representing my database in an XML schema, but I am not just naming an element=database field. But some of my IDs (i.e. USER_ID, and PROFILE_ID) are not the same length in numbers. They are defined in the database as NUMBERPS(2,0), NUMBERPS(3,0),...,NUMBERPS(8,0). T...more >>

deserialize IEnumerable with anyType tags
Posted by Achim Domma (SyynX Solutions GmbH) at 10/26/2005 9:34:25 PM
Hi, I have a data structure which is serialzied into an xml like this: <?xml version="1.0" encoding="utf-8"?> <Storage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Frames> <Frame Index="0"> <Tags> <anyType x...more >>

XML over HTTP
Posted by Jeroen De Brabander at 10/26/2005 8:29:53 PM
Hi, I have to write an interface that accepts "XML over HTTP"-messages. How is this done in .NET? The goal is to have an application (webservice, webapplication, ...) that accepts XML over HTTP and that sends reponses the same way. I'm used to webservices, but this seems to be different...more >>

need help to declard type=IntType instead type="xsd:int" with xml schema
Posted by comic_rage NO[at]SPAM yahoo.com at 10/26/2005 7:07:19 PM
Hi, I am writing C# code to produce xml schema. //Create attribute XmlSchemaAttribute att2 = new XmlSchemaAttribute(); att2.Name = "CustomerID"; att2.SchemaTypeName = new XmlQualifiedName("int",schemaNS); att2.Use = XmlSchemaUse.Required; ct.Attributes.Add(att2); I ...more >>

Sorting an XML document.
Posted by Kevin Burton at 10/26/2005 5:51:02 PM
I have a slightly different sorting question than has been proposed before. My docuement looks like: <Records> <Record> <Sequence>5</Sequence> <Name>E</Name> </Record> <Record> <Sequence>1</Sequence> <Name>A</Name> </Record> <Record> <Sequence>4</Sequence...more >>

Using XSLT to generate emails
Posted by tconti NO[at]SPAM hotmail.com at 10/26/2005 11:34:02 AM
Howdy: I have 2 general questions regarding the use of XSLT to generate emails. We have several procecesses that use XSLT to generate emails. We frequently run into issues where a client complains that they cannot traverse hrefs in the emails. When er acquire the culprit email it appears th...more >>

Add XmlNode
Posted by Paul at 10/26/2005 11:29:29 AM
Here I have the definition of an XmlNode which is a property (PayPreference) on my Customer class containing an enum describing how the customer will pay. <PayPerference xsi:type="a4:Customer+CustomerPayOptions" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/OsfDomain.Resources.Stage/Os...more >>

Can I have the same element declared within itself ?
Posted by sbeerav NO[at]SPAM gmail.com at 10/26/2005 11:09:15 AM
Hi, I wanted to know if it is legal in XML to declare an element within itself. For example... <A> This is an element of type A. <A> This is another element of type A </A> </A> Thanks, Sri ...more >>

XML Schema Quesions
Posted by Mike Logan at 10/26/2005 9:19:12 AM
I am defining an XSD file that will be used for a WSDL import. In my XSD I am defining the objects and WS Operation messages. I have a few questions: - For interoperability sake, how should objects be named, not including messages? Should they be like this "appUser" or "appuser". Is there...more >>

how do i create subset and union in XPath Query
Posted by IMS.Rushikesh NO[at]SPAM gmail.com at 10/26/2005 5:36:54 AM
Hi Friends, I need a XPath query, whcih ll return me subset of data.... check below xml stream <label id="MyExpenseDetails_lbl" xlink:role="terseLabel">Short Expense Details</label> <label id="MyExpenseDetails_lbl" xlink:role="displayLabel">Expense Details</label> <label id="InternalExpen...more >>

XML Schema question from a newbie
Posted by Luigi at 10/26/2005 5:31:55 AM
Hi all! I received an XML Schema in order to create some documents, but inside it there is a definition that looks mistaken: <!-- INFO is a name-value pair --> <xs:element name="INFO"> <xs:complexType mixed="true"> <xs:complexContent> <xs:extension base="xs:string"> ...more >>

how to generate xml schema with UTF-8 instead of UTF-16
Posted by comic_rage NO[at]SPAM yahoo.com at 10/25/2005 7:12:28 PM
Hi, I am writing code with C# to generate xml schema, however, the following code generate a UTF-16 in the first line. This will create some problems. How can get the code/missing what part of the code in C# to generate a first line with UTF-8 instead of UTF-16? Thanks, public XmlSchema...more >>

Xml Versioning Tool
Posted by Paul at 10/25/2005 1:12:07 PM
I've been tasked by my boss to write a tool that will update an xml (soap) file such that when the structure of the object which we're persisting to the soap file changes, my tool will apply the appropriate updates to bring the soap file up to the version of the code before the soap file is ...more >>

Deserializing xs:choice with xs:sequence problem
Posted by Sergey Poberezovskiy at 10/25/2005 12:52:01 AM
Hi, If I define my schema as <xs:choice> <xs:sequence> <xs:element ref="el_1" /> <xs:element ref="el_2" /> </xs:sequence> <xs:sequence> <xs:element ref="el_3" /> <xs:element ref="el_4" /> <xs:element ref="el_5" /> </xs:sequence> <xs:choice> and compile it with .Net 2...more >>

How to insert a node at a specific location in XML Doc
Posted by mike at 10/24/2005 2:01:08 PM
Hello. Let's say I have the following XML document: <ROOT><Element1>Some Text</Element1></ROOT> I want to add a new element after Element1. I tried the following but, naturally, it doesn't work: Dim oElem as XmlElement Dim oNode as XmlNode Dim oRoot as XmlNode Dim oDoc as New XmlDoc...more >>

xsd schemas - how to...
Posted by Sergey Poberezovskiy at 10/23/2005 7:15:02 PM
Hi, I have to specify that a person needs to have at least one out of three phone elements: <Phone type="home"/>, <Phone type="work"/>, <Phone type="mobile"/>, Can anyone please suggest how to define xsd schema to enforce such a rule (note that one type cannot be specified more than o...more >>

problem compiling xsd with xs:choice node
Posted by Sergey Poberezovskiy at 10/23/2005 6:21:01 PM
Hi, As part of my schema I need to ensure that at least one of two fields have values. I defined my schema as follows: .... <xs:choice> <xs:element ref="el1"/> <xs:element ref="el2"/> <xs:sequence> <xs:element ref="el1"/> <xs:element ref="el2"/> </xs:sequence> </xs:choi...more >>

XMLDocument.WriteXML question
Posted by Jacky at 10/22/2005 3:22:03 PM
hello i have to know if the writeXML process is a blocking process. Other mean if i write doc.WriteXML(); int i = 0; Is i = 0 can be executed before doc.WriteXML() method ended???? All this when the data we have to save can need up to 2 3 seconds. I think it's not blocking according to w...more >>

Return DISTINCT ProcessID nodes
Posted by Curious at 10/22/2005 3:06:17 AM
Hi, I have the following XML file. Now I am using the code below to return the number of disticnt ProcessID's in the XML file. The result being returned is the 'System.Xml.XPath.XPathSelectionIterator', while the result should be 2. Can someone help me out solve this problem. Thanks in...more >>

Navigating through XML Documents
Posted by jenyb via DotNetMonster.com at 10/22/2005 12:00:00 AM
Hi , I use VB.net to work with XML database,I need to use a DocumentNavigator class to navigate in XML document, I need to use MoveToChild/MoveToParent there the problem is that i don't know how to load this DocumentNavigator. (when I write the Imports ... it doesn't recognize it ) tnx for adv...more >>

There is an error in XML document
Posted by Jeff at 10/21/2005 7:26:16 PM
Hello I am creating a web client in c#. I use the "Add a Web Reference" wizard to read a WSDL file, then I simply call the method for the remote service. I get the floowing error returned when I make the call.: There is an error in XML document (1,454) The source of the error is System.Xml ...more >>

DataSet.ReadXml fails when a percentage (%) sign is in the filename followed by 2 hex characters
Posted by CB at 10/21/2005 12:14:14 PM
Using C# in .Net 2003, DataSet.ReadXml fails when a percentage (%) sign is in the filename followed by 2 hex characters. Seems that the % sign is likely encoding the following 2 hex characters. So c:\test%ab.xml fails for ReadXml since %ab is interpreted as 171 and c:\test171.xml does not ex...more >>

Write javascript
Posted by Yama at 10/21/2005 12:03:39 PM
Hi, How can I dynamically embed the content of a filename.js into a .aspx page before rendering it to the client? Thanks, ~yamazed ...more >>

REdering Javascript from an XML file
Posted by Yama at 10/21/2005 11:22:12 AM
Hi, I have 20 javascript files I would like to dynamically write to my rendered web page. What I would like to do is instead of saving them into a database table save them into a XML file then retrieve them according to user selection. The question is how do I do that? How can I save into a...more >>

XmlSerializer/XmlTextWriter all data on one line
Posted by Steve at 10/21/2005 9:53:20 AM
I'm an XML newb. I'm serializing a class and when I inspect the xml file, all the data is on one line rather than being nested and indented Is that normal? <code> StreamWriter sw = new StreamWriter(m_optionsXmlFilePath, false); XmlSerializer xmlSerializer = new XmlSerializer(typeof(Options...more >>

streaming random filetypes from .aspx
Posted by Daniel at 10/20/2005 12:31:48 PM
streaming random filetypes from .aspx how to stream a file from inside a .aspx? e.g. so one could go href="./foo.aspx?file=bar.mp3" or href="./foo.aspx?foo.dat" etc. preferabley i would like all file types to open with "save as" when href clicked ...more >>

Transform Xml to DataSet
Posted by Jason at 10/20/2005 11:20:36 AM
Hello, I am working on a problem which requires me to take a String variable containing some Xml, transform it using Xslt, and dump the result into a DataSet. What would be the quickest way to do this? - I don't want to use any files in this process. Thanks, Jason ...more >>

am I misunderstanding readxmlschema ?
Posted by David Bartosik [MSFT MVP] at 10/20/2005 9:57:31 AM
I am writing an xml file from a dataset. I don't want the xml file to use the table names, I don't want the schema inferred from the dataset. Because of this I created an xsd to provide an explicit schema. I create my dataset object, I set it's readxmlschema to my xsd file, then I writexml. F...more >>

XSLT, XML to XML
Posted by Jason at 10/19/2005 7:08:53 PM
Hello, I would like to transform this; <?xml version="1.0" encoding="utf-8" ?> <ProductList> <Product> <ID>1</ID> <Name>Gadget</Name> </Product> </ProductList> to this; <?xml version="1.0" encoding="utf-8" ?> <ProductList> <Product> <ID>1</ID>...more >>

Baffling READXML problem
Posted by bfrasca NO[at]SPAM comcast.net at 10/19/2005 9:39:27 AM
I have a well-formed XML file that I am trying to load into a dataset using the ReadXML method. It keeps telling me that "there are multiple root elements". I can view the data using XML Designer in Visual Studio 2003 without any problems and the schema and file have been validated using sever...more >>

Schemas, choice and max occurence
Posted by rossu at 10/19/2005 8:49:05 AM
One of the nice features of XML is that it is order independent i.e. <a>1</a><b>2</b> works as well as ><b>2</b><a>1</a>. Unfortunately, the schema system in .NET doesn't seem to be happy with this. It is constantly throwing in <xs:sequence> tags. I can replace this with a <xs:choice> tag, ...more >>

Linked Schemas in a SchemaCollection
Posted by AndrewDucker at 10/19/2005 5:02:13 AM
(Posted to microsoft.public.xml originally, then realised this was a better place for it) I've got three schemas I'm trying to add to a schemacollection so that I can validate a series of documents. The schemas are going to be held in the manifest, so I'm grabbing them as streams and using S...more >>

Two Deep XML?
Posted by Harry Whitehouse at 10/18/2005 2:01:32 PM
I have some code which creates an XML output like this: < Product> <Product ID>1</ProductID <ProductValue>5.00</ProductVaue> </Product> < Product> <Product ID>2</ProductID <ProductValue>10.00</ProductVaue> </Product> Here it is: newElem =3D...more >>

Xslt transform in code yields nothing
Posted by Andy at 10/18/2005 12:38:53 PM
Hi all, I'm having a problem doing an Xslt transform in code. I've done it before, so I'm not really sure why its not working. The problem is that the result of the transform is an empty string. I expected the xml to be transformed into a plain text document. Everything works fine when i ...more >>

Newbie - how do I post XML from c#?
Posted by Brett Hargreaves at 10/18/2005 12:23:39 PM
Hi, I want to programatically create a small xml doc in memory, post it to = another site then capture the resultant xml response into another xml = doc for parsing. I don;t want to save the file to disk, I want in all done in memory and = automatically. eg, this is what I have so far; ...more >>

XSLT Optimization
Posted by rviray at 10/18/2005 10:09:24 AM
Hopefully, someone could point me in the right direction. I have we services that takes a DataSet object and Transforms it into pre-defined XSD (outside of my organization's control). I hav successfully done everything, now I am at a point where I want t verify that my XSLT logic is optimized....more >>

problems compiling xsd in .Net 2003
Posted by Sergey Poberezovskiy at 10/18/2005 6:03:01 AM
Hi, I have an .xsd document (Inc_B.xsd) that "includes" two more from the same folder: <xs:include schemaLocation="Inc.xsd" /> <xs:include schemaLocation="Inc_A.xsd" /> They all have the same targetNamespace="http://tempuri.org/Inc.xsd" xmlns:ir="http://tempuri.org/Inc.xsd" xmlns:xs=...more >>

Showing a XmlDocument
Posted by Fernando Moreno at 10/18/2005 1:37:07 AM
Hi, this is maybe very easy and there's something I'm sure missing here but I can't find how to show an Xmldocument object in f.ex. ie without save document as xml first. Is this possible? Thanks...more >>

Need XPath examples for following-sibling
Posted by Mori at 10/17/2005 6:58:01 PM
I have the following xml. I need to use XPath to get the year when ever the style is pickup. Both year and style are siblings. <?xml version="1.0" encoding="UTF-8"?> <automobiles> <automobile> <style>pickup</style> <make>chevy</make> <year>2002</year> </automobile> <automobile...more >>

Deep Copy of XmlDocument
Posted by Waldemar FEM at 10/17/2005 3:43:02 PM
What is an easy way of making a deep copy of an XmlDocument object? Right now I'm doing something like this: XmlDocument inputDoc; XmlDocument copyDoc; ..... StringBuilder builder = new StringBuilder(); TextWriter textWriter = new StringWriter(builder); XmlTextWriter writer = new XmlTextW...more >>


DevelopmentNow Blog