all groups > dotnet xml > february 2007
Filter by week: 1 2 3 4
Adding namespace prefix to Root node
Posted by scottpet NO[at]SPAM gmail.com at 2/28/2007 1:35:43 PM
Hi,
I want to add a namespace prefix to the root node of an object I am
serializing to XML.
I have been reading though this article:
http://msdn2.microsoft.com/en-gb/library/system.xml.serialization.xmlnamespacedeclarationsattribute.aspx
I get namespace prefixes in the document, but not o... more >>
Need XSLT to throw Runtime Exception
Posted by IAMDkg NO[at]SPAM gmail.com at 2/27/2007 2:09:06 PM
Hi there - Can somebody give me some pointers on how I can create a
XSLT which will compile fine but will thow a runtime exception during
runtime.
I tried to do the following but it doesn't throw any runtime
exception.
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xm... more >>
Error in proxy class generation when using WSDL.exe of 2.0
Posted by Sriram Mallajyosula at 2/27/2007 3:24:03 AM
Hi,
We were using .Net Framework 1.1 version of wsdl utility to generate proxy
classes for our ASP.Net 1.1 version. But now if I try to create proxy classes
for .Net Framework 2.0 version the classes are created but when I try to
consume the web service some extra events are being added whi... more >>
DataSet/XmlSchema/DataGrid Framework 1.1 - 2.0 Problem
Posted by Martin Madreza at 2/26/2007 7:25:09 AM
Hi,
I have a problem with reading an XmlSchema with Frameowk 2.0 and an
own DataType. I found no example
(searching two days).
What I do is:
DataSet dataSet = new DataSet();
dataSet.ReadXml("{path}/MySchemaAndData.xml");
dataView = dataSet.Tables[0];
dataGridView.DataSource = dataVie... more >>
XML and XSL translation
Posted by David at 2/24/2007 3:05:21 PM
Hi,
I am trying to do an XML translation. I have not done much with XML apart
from generating a few RSS feeds or saving from datasets.
I have found numerous example on the net about it, all of them very similar.
However, when I use them, they go into response.output rather than a label
or l... more >>
xml schema: elements with unique attribute values.
Posted by Asko Telinen at 2/24/2007 12:00:00 AM
Hi all.
I´m a bit newbie writing xml schemas.
Is it possible to define xml element that must have unique attribute
values in same level. For example if i have a xml - document:
<list>
<subsection name="first">
<!-- subsection contents -->
</subsection>
<subsection... more >>
xs:element name in xsd file for int.
Posted by trialproduct2004 NO[at]SPAM yahoo.com at 2/22/2007 11:06:03 PM
Hi all,
I am having table in database with say name as '1company'. when i
generate strongly typed dataset for this table in xsd file i am
getting entry as below:-
<xs:element name="_x0031_company" type="xs:string" minOccurs="0" />
Can anyone tell me why column name '1company' is written ... more >>
Translate() doesn't work
Posted by Gaurav at 2/22/2007 6:00:13 PM
Hi,
I am using the Translate() function in one of the .XSLT file to remove the
spaces, like this:
<xsl:for-each select=".//Illustration">
<xsl:value-of select="translate(./@illusName, ' ', '')"/>
….
This works fine with command line msxsl and XML editors like XMLSpy.
However, if you... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Removing xmlns:xsd and xmlns:xsi when using ImportNode
Posted by Keith Patrick at 2/22/2007 3:12:10 PM
I'm doing some document merging where I want to bring in an XmlDocument and
import its document element into another document deeper in its tree.
However, when serializing my underlying objects, .Net likes to add these
namespaces:
<RootNode xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns... more >>
XML Serialization with of a sub-class of DataTable.
Posted by sylvain.ross NO[at]SPAM gmail.com at 2/22/2007 12:25:21 PM
Hello everybody,
I have a very weird problem regarding the serialization of a class
that I wrote (named DummyClass in my exemple).
My class inherits from DataTable.
Then I just try a dummy XMLSerialization and then Deserialize it into
a new object.
The problem is that everything is fine ... more >>
vb.net xml namespace xmlns xmldocument
Posted by marfi95 at 2/21/2007 12:16:34 PM
I am using XMLDocument to create my xml. How do I remove the
namespace information ? It is being put on all my xml nodes:
<MyServ xmlns="http://www....../XInclude>
<Timeout xmlns="">100</Timeout
<MyServ>
I am using CreateElement as such
xElem = newXMLConfigDoc.CreateElement("Ti... more >>
Passing Static Text Between Client and Server
Posted by Mike at 2/21/2007 10:34:03 AM
I have a list of static text that I want the client and server to be able to
share such that I don't have to hard-code the text on both sides. The client
communicates with the server via web services.
How do I set this up so that both sides can simply refer to the the same text?
I tried a... more >>
vb.net creating xml
Posted by marfi95 at 2/21/2007 10:20:05 AM
My app is creating an entire XML document through the code. I want
the root node to look as follows:
<MyService xmlns:xi="http://www.w3.org/2003/XInclude">
....
</MyService
I can't seem to get the :xi to be put into the xml though, so it looks
like this:
<MyService xmlns="http://www.w3... more >>
retaining leading whitespace in text of an xml node
Posted by Steve Richter at 2/19/2007 8:23:38 AM
when I run the following code the leading spaces of the "data" node
are removed. How do I retain whitespace?
private void CreateBasicXmlDocument()
{
XmlWriterSettings writeSettings = new XmlWriterSettings();
writeSettings.Indent = true;
XmlWriter writer = XmlWri... more >>
xpath match text question
Posted by Chuck P at 2/18/2007 9:00:08 PM
I am trying to retrieve the @AnswerCount Attribute
for the @QuestionID=1 AND the Answer element text =3
I successfully can pass the variables QuestionID and Answer but can't pull
out the
@AnswerCount
<QuestionResults>
<Question QuestionID="1">
<Answer AnswerCount="1">1</Ans... more >>
attribute not declared for validating schema init
Posted by William Johnston at 2/16/2007 11:18:00 AM
Hello,
I get the following error when instanciating an XmlReader that performs validation:
"The 'http://tenbase2.com/DVDTimestamps:schemaLocation' attribute is not declared."
My beginning XML tag starts as follows:
<DVDTimestamps xmlns:tb2="http://tenbase2.com/DVDTimestamps" tb2:schema... more >>
But it works without a namespace
Posted by nhogge NO[at]SPAM gmail.com at 2/15/2007 7:20:34 PM
I have recently come to peace with XML namespaces and have switch to
always ripping them out to using them. Has not been too bad but some
things I use to do no longer work.
Given this XML:
<?xml version="1.0"?>
<UpdateManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd... more >>
fragment vs. document?
Posted by Jan Eliasen at 2/14/2007 2:51:28 PM
Hi
I have some C# code that loops through an XMLDocument and needs to
apply an XSLT stylesheet to each node in the XML document.
My (simplified) code looks like this:
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(filename);
XmlNodeList nodeliste =
xmldoc.SelectNodes("/*[local-name... more >>
Escape and unescape text for serialization and deserialization?
Posted by Richard Lewis Haggard at 2/12/2007 1:13:48 PM
Is it possible to use features from XmlDocument to unescape text back to its
original raw text format after it has been escaped to handle non-HTML
compliant character strings?
I have code that serializes text to an XML file and then deserializes back
to text. If the user enters XML illegal tex... more >>
Non Default Constructor
Posted by Mike at 2/12/2007 12:35:00 PM
I'm building a C# application that uses web services. I have a class with a
default constructor, an overloaded constructor, and some web methods. When
VS creates the asmx file, it doesn't include the overloaded constructor.
Plus it doesn't initialize the private objects in the class.
Is ... more >>
How parse XML values from a string?
Posted by Ronald S. Cook at 2/11/2007 5:19:59 PM
I have a string (see below) that I want to parse out the values. As you can
see, some are element-based and some are attribute-based.
<METADATA version="Format5"><TITLE value="Adrenaline
Rush"/><DESCRIPTION>Take a thrilling look at the world of skydiving and base
jumping - parachuting from... more >>
Serializing CultureInfo
Posted by Nahom Tijnam at 2/11/2007 1:26:11 AM
Hi,
I have a class which has a property of type System.Globalisation.CultureInfo
in a class library project based on .NET framework 1.1 (Visual Studio 2003).
I want to expose the classes and its functionalities using Web Service but
while testing the web service, it throws the following er... more >>
Understanding XSD
Posted by Andrew Brook at 2/8/2007 3:35:31 PM
Hi Everyone,
I'm hoping somebody can recommend a good in-depth book which will help me
fully understand XSD. A book which is aimed only at entry level will *not*
suffice.
Does anyone have any suggestions?
thanks,
Andrew
... more >>
Evaluation of Microsoft XPath exstensions ms:utc()
Posted by jerryn at 2/7/2007 11:25:02 AM
I am trying to evaluate the Microsoft ms:utc() XPath extension in an XPath
expression. When I do, I get an exception that I need an XsltContext. Given
these are microsoft extentions, it seems unlikely that I would need to
implement my own IXsltContextFunction class for microsoft published
... more >>
illegal character in xml file
Posted by Andy Fish at 2/6/2007 4:52:03 PM
Hi,
I have an XML file that was created as a DOM tree in .Net 1.1 and serialized
to disk. If I try to put character code 1 inside one of the attributes
(don't ask why), it seems to serialize perfectly ok and I get a file that
looks like this:
<element attribute="" />
which looks p... more >>
Converting XML with CDATA -> HTML
Posted by BillAtWork at 2/6/2007 3:35:01 AM
Hi,
I'm defining a report layout using an XML document, plugging data values
into fields before outputting the whole doc as an HTML page. I wrap each of
the data fields in CDATA section (in case the data contains reserved chars
like "&").
Currently, I perform a simple search-and-replace to... more >>
.NET 2005 versus 2003 standard edition
Posted by javanewbie22 NO[at]SPAM yahoo.com at 2/5/2007 6:20:41 PM
Dear experts,
There is a lot of talk these days about .net.
I'm considering buying the software to pick it up.
Yet something else to learn!
I notice that you can get older standard version
..NET 2003 on the web. Much cheaper than the 2005 version.
How much different is 2003 standard edit... more >>
Encoding
Posted by mortb at 2/2/2007 9:17:22 AM
1. How do I determine which encoding a xmldocument or xmlreader uses when
opening a document?
I'm not just talking about the <?xml encoding="utf-8"?> attribute, but the
actual encoding of the characters in the underlying stream.
2. How do I make sure that the encoding of my created xmldocume... more >>
XML Formatting Issue With Elements
Posted by Terrance at 2/2/2007 8:45:00 AM
I have the following issue I was hoping someone can help me with. I have an
XML doc in the following format:
<main>
<friend value="friend1">
<email>friend1@mailserver.com</email>
</friend>
<friend value="friend2">
<email>friend2@mailserver.com</email>
</friend>
</main>
My proble... more >>
XML excel file
Posted by jessi at 2/2/2007 8:39:30 AM
Hello!!!
I need to insert an image file in this XML Excel file. How can I do it?
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microso... more >>
Xml Array(?) of Values
Posted by smithb1028 at 2/1/2007 6:26:09 PM
I would like to create an XML structure like so:
<Root>
<Reasons>
<Reason>value1</Reason>
<Reason>value2</Reason>
</Reason>
</Root>
I fugured start with a string[] like so:
string[] reasons = new string[] { "value1", "value2" }
and then use a foreach to make each e... more >>
xmltext reader and namespace
Posted by MAF at 2/1/2007 2:18:47 PM
I am gettin the following error: 'ns1' is an undeclared namespace. Line 13,
position 5.
The way I got around this with using a xmldocument like this.
System.Xml.XmlDocument XMLDoc = new XmlDocument();
nsManager = new XmlNamespaceManager(XMLDoc.NameTable);
nsManager.AddNamespace("ns1"... more >>
|