all groups > dotnet xml > april 2007
Filter by week: 1 2 3 4 5
structure of xml classes in C#
Posted by a.kamroot NO[at]SPAM gmail.com at 4/30/2007 7:17:16 PM
Hi
I need to exchange XML formated information between two methods in my
C# program. I have been trying to play with XMLNode and XMLElement but
without much success. I think I want to stop now and understand the
xml classes in C# (rather in dot net) before proceeding further.
Can any one po... more >>
Web Service migration question
Posted by doug at 4/30/2007 7:00:04 AM
I built a ws locally takes in a request object and returns a response object.
The ws reads in a good sized xml file and the request oject has elements
used to create an xml subset and returns it as a response object. Use
XSD.EXE to create proxy classes. I built WSDL and it is stored same loc... more >>
Random XPath generator
Posted by rsotolongo NO[at]SPAM gmail.com at 4/27/2007 5:13:47 AM
I need generate randoms XPath expressions to make queries to XML
documents.
Someone can help me to find a component (class) that auto generate
XPath expressions???.
Maybe, someone can say me where to start???.
... more >>
How to create objects derived from XML
Posted by Norbert Pürringer at 4/27/2007 12:23:28 AM
Hello!
I have somewhere read that it is possible to create automatically .NET
classes describing the structure of an XML file.
I would like to read an XML file, which will be deserialized in proper C#
classes.
Does someone know links for me which steps must be performed to do such
things... more >>
at runtime, get possible choices for xs:choice class
Posted by GovernmentMan at 4/26/2007 8:04:04 AM
Hi,
I am using Reflection to build a GUI based on a class create with XSD, in VB
..NET 2.0. For most elements, I can easily determine the Type and then
provide the user some controls to select what data to use (they are creating
an XML document essentially on the fly). But the choice elemen... more >>
Design time bug - [XmlDocument].selectSingleNode() - VS2005?
Posted by Paul at 4/26/2007 2:31:57 AM
I have some code that loads and queries the web config file in the
design enviroment.
This worked happily pre-VS2005 and indeed is still able to load the
Xml into an XmlDocument object.
I am also able to traverse it using DocumentElement, FirstChild etc.
But if I attempt an XPath query to... more >>
how to update an XML table
Posted by slinky at 4/23/2007 12:39:42 PM
Thanks in advance for any help... I have an .aspx file that I need to
update a list of email addresses to receive my newsletter (doesn't
have to be XML, an SQLserver table would work too I guess... are there
any advantages to either). OK I have a textbox that the user types in
their email addre... more >>
Validation errors in xml file
Posted by Doug at 4/20/2007 12:53:26 PM
Hi,
I am trying to use a validation method against this xml and keep
getting 'The 'name' attribute is not declared' and I can't figure out
why.
Here is my XML:
<XmlCommand xmlns="http://intranet/hstServices/Schemas/XmlCommand.xsd"
connectionKey="SomeKey" commandTimeout="60" appId="122"
ap... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Reading the XSD to get the Elements and Attributes for the XML
Posted by tdpriya1984 NO[at]SPAM gmail.com at 4/19/2007 9:39:57 PM
Hi,
Is it possible to fetch the Elements and Attributes in XML by reading
the XSD??
I want to develop a application whose Elements and Attributes changes
when i change my Schema. The Elements and Attributes will be displayed
in the Form to fetch the user input and the new node will be appended
... more >>
how to write this out using xmlwriter
Posted by Paul at 4/19/2007 12:46:01 PM
Hi I have a .net application and am using the xml writer class to create an
xml file that opens as an excel file. I am trying to write out the following
but am having difficulty.
<Row>
<Cell ss:StyleID="s87">
<ss:Data ss: Type = "String">
<Font html:Color="#FF0... more >>
.NET and XMLSchemaSet
Posted by Christopher at 4/19/2007 6:54:01 AM
Hello,
Using .NET 2.0 and the System.XML.Schema.XMLSchema class. I am adding some
schemas into the XMLSchemaSet object using XmlSchemaSet.Add.
The schemas I am adding have circular imports, and therefore I have
implimented a custom XMLResolver class to help filter out duplicate schemas.
Now ... more >>
Accessing an XSD file
Posted by Doug at 4/18/2007 5:22:34 AM
I'm trying to access a schema file as such:
Dim settings As XmlReaderSettings = New
XmlReaderSettings()
settings.Schemas.Add(webServiceNamespace, schemaFileName)
settings.ValidationType = ValidationType.Schema
Even though the webServiceNamespace value abo... more >>
XPath help
Posted by JHD at 4/17/2007 11:19:18 PM
Hi,
I'm trying to use the XMLDataSource and DataList controls in Visual Web
Developer Express (VB.Net) to present the following rss file in a web
application. The problem lies in that I want to just select items (title,
description and link) that are in the 'april' category. Can anyone help... more >>
Data display issues
Posted by Richard at 4/17/2007 5:23:29 PM
I am new to XML so pardon my ignorance. I have an XML file that is used to
layout an invoice from a program. The problem I am having is I need more
data than the program puts out so is it possible to use a script or
something to query an MS SQL Server database for the additional data. I so
h... more >>
specify DTD location?
Posted by Stephen Falken at 4/17/2007 3:58:51 PM
I need to validate incoming XML files in a VB.Net 2005 application that
must adhere to a DTD. This DTD is the only schema these XML files need to
validate against.
How can I specify/load the DTD, either as a file in the application path
(installed with the application), or better yet as an ... more >>
Urgent problem with System.Xml.Schema.XmlSchema
Posted by JMD at 4/17/2007 1:28:18 PM
A set of xsd files has been working fine for us at this site, but now
it gives *intermittent* errors for someone at a different cite (who is
consuming the code we are producing). Most of the time it works
fine. Occasionally it gives an error in the schema compiler:
"System.Xml.Schema.XmlSc... more >>
XML reader issues....
Posted by Lloyd Dupont at 4/17/2007 12:00:00 AM
I have a XML document (not of my making) which starts like that:
==========
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
.........................
=========... more >>
Can I extract the xpath to all elements within a XSD schema?
Posted by Maxwell at 4/16/2007 7:32:01 PM
Hi,
Is there any tool or API call that extracts the xpath for all elements
within an XSD schema?
Here are some examples:
Order/OrdrItems/ProductID
Order/Customer/Address
Any help would be appreciated,
Max
... more >>
How many times does a control trigger a "MODIFIEDCHANGED" event???
Posted by Alan Mailer at 4/15/2007 8:44:32 PM
Ok, I'm pretty new to VB.Net, so please bear with me. Imagine the
Load event of one of my forms includes the following:
Dim ctrl as Control
Dim txtbox As TextBox
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
txtbox = CType(ctrl, TextBox)
AddHandler txtbox.ModifiedCha... more >>
Split Address in XSL
Posted by lastbuilders at 4/13/2007 4:27:01 AM
Hi,
I am trying to split an address into serveral parts in an xsl
stylesheet and was hopeing to get some pointers.
The addresss are similiar to
"testaddress, Templeogue, Dublin 16, Ireland , this is a very, long
address"
I need to split this into between 1 and 4 parts none of which ca... more >>
Formatting XmlTextWriter Output
Posted by clintonG at 4/12/2007 12:06:39 PM
// I want this format...
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:media="http://search.yahoo.com/mrss/">
The WriteStartElement is used for the rss element and extended using the
WriteAttributeString method which outputs the version and namespace
... more >>
XPath filter on multiple attributes
Posted by anxauto NO[at]SPAM gmail.com at 4/12/2007 7:48:59 AM
I have the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<SETTINGS>
<DATABASE NAME="DEMO" DESCRIPTION="Demo database">
<USER NAME="arnaud" />
</DATABASE>
<DATABASE NAME="TEST" DESCRIPTION="Test database">
<USER NAME="peter" DEFAULT="1" />
<USER NAME=... more >>
InvalidOperationException: ReadElementContentAsString method is not supported on node type None
Posted by J055 at 4/11/2007 6:39:27 PM
Hi
I get the error:
System.InvalidOperationException: The ReadElementContentAsString method is
not supported on node type None. Line 267, position 12.
when running the following code:
while (reader.Read())
{
// Move to the Email element.
reader.ReadToFollowing("Email");
string ema... more >>
generating xml from arraylist
Posted by Abid at 4/11/2007 12:40:30 PM
Hi,
I am trying to create xml document which could serve for datagrid,
however the data is contained in an arraylist and i want to populate
the grid using the data in arraylist....so can anyone please let me
know that how is it possible...or any other way to accomplish it...
Thanks in advan... more >>
XML File with XSD Question
Posted by Rikleo at 4/11/2007 12:00:00 AM
Guys,
First of all I am new to XML.
I have an XML file and XSD file as well and I have database under SQL 2000
Is there a way to load that file into SQL Server stored Procedure and
process the each element through Loop with my custom changes.
All I need to know that how I load XML file... more >>
How To get Attributes of an XML Element Using XPATH
Posted by BillGatesFan at 4/10/2007 4:07:28 PM
Does anyone have any code to get Attributes of an XML Element Using
XPATH. I have been trying all day and cannot get this to work. I have
been using XPathNavigator, XPathDocument and the XPathNodeIterator
trying to get the url attribute of the following XML:
<?xml version='1.0' encoding='utf-... more >>
Web.Config File
Posted by Robin Chatterjee at 4/10/2007 10:06:03 AM
Hello:
Ive got a page name with an "@" in it present.
Ex. Page1@sales.aspx
Ive defined the below in the Web.Config file. Results.. it does not work.
I replaced the @ with its UTF-8 equivalent. Still did not. Pls do advise,
how to get it to work. Thank you.
<location path="Page1@sales.as... more >>
Collection of XML Elements
Posted by BillGatesFan at 4/10/2007 9:04:39 AM
Is there anyway to read a collection of xml elements in .NET? The XML
Reader class does not seem like it can do it. It reads the file
sequentially.
I want to read an xml file and get the collection of elements named
book. The for each book element I want to get its attributes and inner
elemen... more >>
XML to comma delimited file
Posted by jgershonw1 NO[at]SPAM yahoo.com at 4/9/2007 10:10:09 AM
I have an XML file with 8 tables and want to output each table into a
separate file. The tables contain over 150,000 records each, so I
need a fast and efficient way to convert these to comma delimited
files. Can somebody point me in the right direction on how to proceed?
... more >>
XmlSerializer fails on object loaded from an activated assembly
Posted by christopher.watford NO[at]SPAM gmail.com at 4/9/2007 7:53:05 AM
I'm loading a plugin assembly using Activator.CreateInstanceFrom, and
inside this assembly is a settings class which gets serialized to XML.
The general code flow is as follows:
ObjectHandle pluginHandle = Activator.CreateInstanceFrom(assemblyName,
type);
object plugin = pluginHandle.Unwrap... more >>
Binding XML to GridView
Posted by Rob at 4/8/2007 12:20:33 PM
Hi,
Firstly, Happy Easter!
I'm trying to bind some XML data to a .net control and it looks like it
should be easy - except it's completely stumped me!
I have a GridView control which is using an XMLDataSource. The XMLDataSource
points to an XML file with the contents as shown below.
... more >>
XmlTextWriter to StreamWriter problem
Posted by GaryDean at 4/7/2007 2:21:19 PM
I'm using an XmlTextWriter and it's various methods such as
WriteElementString, WriteStartElement, WriteEndElement, etc to create an xml
document. When I instantiate the XmlTextWriter to a file...
XmlTextWriter mytw = new XmlTextWriter("c:\\temp\\myfile.xml", null)
Everything writes prope... more >>
html XSL Transform
Posted by patrickbeaudoin NO[at]SPAM gmail.com at 4/7/2007 12:04:02 PM
Hi,
I have a problem when I put the <html> tag in to a xsl transformtion.
First, I give you a xml and xsl example:
XML:
<form title="Test" height="600" width="800">
<element type="check">
<style name="top" value="25" />
<style name="left" value="124" />
</element>
<element t... more >>
Re: How to remove xmlns attribute from XML document (.net)
Posted by Greg Collins [Microsoft MVP] at 4/7/2007 9:42:08 AM
Here is an updated link to the above Braintrove article:
Prevent Namespace Prefixes from Being Copied to the Output
http://www.braintrove.com/article/8
--=20
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )
... more >>
!Urgent: Ask for XPath support in VS 2005
Posted by Joe.ntang NO[at]SPAM gmail.com at 4/6/2007 11:58:50 AM
Hi,
How is the support of VS 2005 to XPath? In fact, I care about only
very simple XPath here, such as a//b[@lang='eng']. And I want parse it
into a tree so I can easily manipulate it.
Please someone tell me how to do it. I need it in a hurry.
Joe
... more >>
XmlWriter newbie question
Posted by GaryDean at 4/4/2007 6:02:20 PM
I'm trying, for the first time, to write XML to a string that will be sent
out to a web service.
According to the docs I have found...
An XmlWriter needs a XmlTextWriter that needs a StreamWriter that needs a
stream. (is it really this hard?)
So I'm defining...
System.IO.Stream astre... more >>
Export DataTable to XML with simple transform
Posted by J055 at 4/4/2007 5:51:24 PM
Hi
I've been looking into ways of exporting typed DataSets and DataTables to
XML files. I need to manipulate the output before creating the XML file so I
don't think the WriteXml methods will do.
I would like a simple way of transforming a DataTable from e.g.
<accounts>
<account>
... more >>
Best approach to deserializing nested elements.
Posted by Jeremy_B at 4/4/2007 8:24:02 AM
I am working on an order entry program and have a question related to
deserializing nodes with nested elements.
The purchase order contains multiple line items which I select using an
XmlNodeList. I am trying to deserialize the nodes using a foreach as follows:
foreach(XmlNode lineItem in ... more >>
XPath attrbute issue
Posted by Jesper, Denmark at 4/4/2007 8:14:03 AM
Hi,
Say I have the following xml, below, and would like to get the second <bar>
element with the following xpath expression "/foo/bar[i='1' and j='2']". This
only works if the 'i' attribute value differs from the first and second bar
element - why?
I can't see any ambiguity issues.
<f... more >>
Anyone know how to work with Xpath in XmlNode ? Need some help with this please.
Posted by jesper_lofgren NO[at]SPAM yahoo.se at 4/4/2007 3:53:52 AM
Hello, i need to help here.
I have a xmlnode as you can se below (full xml is in the bottom). I
wonder how i can get the values inside the CSammanstallningLista .
<CSammanstallning Id=3D"Omrade" DefaultInclude=3D"0">
<Rubrik>Omr=E5de</Rubrik>
<Text>Kallh=E4ll. Fabriksv=E4gen,... more >>
Extra Carriage Return Problem
Posted by YS Ram at 4/3/2007 9:34:04 PM
(Sorry if this post appears twice, as I couldn't see my initial post after 4
hours)
Hi,
I am using XML XSL to create a CSV file using Transformation. But during the
transformation all the Newline characters (CHR 10) is getting translated to
Carriage Return and New Line (CHR 13 and CHR 10... more >>
How to Parse Mixed Content
Posted by Iain at 4/3/2007 3:22:35 PM
I've spent a while researching this and my analysis to date indicates it
can't easily be done in dotnet.
what I want to do is to take xml like this
<stuff>
<node id="1"/>Now<node id="2"/> <node id="7"/>is<node id="14"/> <node
id="15"/>the<node id="19"/> <node id="20"/>winter<node id="21"/>
... more >>
xslt not working when xml has xmlns="urn" in root element.
Posted by Lee at 4/3/2007 11:18:49 AM
Hello guys, I am new to XML and working on a XSLT to transforn yahoo
shopping search result to html. my problem is the return XML contain
xmlns in root element, here is the sample xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="aproductsearch.xslt"?>
<Produc... more >>
search and insert
Posted by gk at 4/2/2007 11:43:58 PM
Hi,
I have trouble figuring out how to search for a particular string in an XML document and annotating it.
For example if I'm looking for the string "sentence with tagged words" and wish to annotate it with a "found" tag:
original xml:
<xml>an example sentence <tag>with tagged words</tag>... more >>
XML DATA Verification
Posted by Rami at 4/2/2007 8:42:53 PM
I am using an XSD schema to validate an XML document. I want to
validate both XML structure and [data]. When I try to validate the
document, the validation only checks for things like proper tags, and
correct data (like integer or string). So if I put any character in
between tags that should e... more >>
Un-flattening XML-data
Posted by Adri Genis at 4/2/2007 8:31:38 PM
Hi,
I am exporting data from a MS Access 2003-database and has to transform it
into a structured document. The input is as follows:
<departments>
<department>
<name>Community Services</name>
<person-in-charge-first-name>Gabriel</person-in-charge-first-name>
<... more >>
C# and XML Document
Posted by news.microsoft.com at 4/1/2007 8:08:52 PM
I am having problems with the following code. I am able to open the xml
document and read it into memory and if I step through the code and look at
the variables, I can see that the XML document is correct. What is
happening is that what is being returned into TableName is
"System.Xml.XmlE... more >>
|