all groups > dotnet xml > july 2004 > threads for july 15 - 21, 2004
Filter by week: 1 2 3 4 5
document() function problem
Posted by Stan Huff at 7/21/2004 6:43:14 PM
I am trying to use the document function inside an ASP.Net control,
specifically a SharePoint Web Part. For whatever reason, the function
always seems to return an empty node set. I am providing a resolver to both
the Load method and the transform but it doesn't seem to matter. I then
derived... more >>
Clone XPathDocument
Posted by blair at 7/21/2004 4:46:02 PM
Hello everyone,
I am converting a small personal program to .NET 2.0 and changing from using XmlDocument to XPathDocument. Ok so my problem is that the system currently clones a XmlDocument (it gets edited / used / and tossed but the orginal document is needed later). Is there some way to "Clone" a... more >>
XmlSerializer for optional xs:date
Posted by dmessenger NO[at]SPAM verdantsys.com at 7/21/2004 9:45:59 AM
I have several elements that have optional child elements and
attributes that are xs:dates.
I have been using System.DateTime and the XmlAttribute/XmlElement
attributes, but these will never work as System.DateTime can never be
null.
So
public class MyClass
{
[XmlAttribute("a")] public... more >>
Serialization and elementFormDefault
Posted by jerome.avoustin NO[at]SPAM insa-lyon.fr at 7/21/2004 6:13:56 AM
Hi !
I've got a big XML Schema defined in several files.
There are files in which there are just type definitions.
But i can't modify this Schema and i must use it (Don't ask me why !)
!
Unfortunately, there's a problem in it, which prevents me to Serialize
and Validate an XML file
In XML... more >>
Renaming an element
Posted by pjeung at 7/21/2004 1:21:02 AM
Say that I have an element <elementA> that has several layers of subelements.
In System.Xml.XmlDocument and related classes, how do I rename <elementA> to <elementB> leaving the subelements intact?... more >>
How do I write a string in the destination element depending on what the string is in the source, using XSLT/XPath? (Like a switch statement.)
Posted by Joakim Olesen at 7/20/2004 5:23:51 PM
Is there something like a switch statement in XPath? What I want to do is
this:
In the source there is an element called "member" with either the value "0"
or "1". In the destination element (also called "member") the value should
be "No" or "Yes" (Where "0" corresponds to "No" and "1" to "Yes... more >>
XML Serialization
Posted by Hollywood at 7/20/2004 1:14:55 PM
I have an class (A) that contains an class (B1) of type (B). An class (C),
contained by class (A), contains its own class (B2) of type (B). When I want
to serialize class (A), I want to ignore, programmatically, certain
properties on class (B1), BUT, I want those same properties to not be
ignore... more >>
Can an XmlNode from one XmlDocument be copied to another XmlDocument?
Posted by Bob at 7/20/2004 11:50:13 AM
I'm wondering if one node that belongs to one XmlDocument can be appended to
another XmlDocument as a new child without having to build a new node from
scratch. I would think XmlNode.Clone() is for this purpose but no, it
doesn't work. I got the following error:
The node to be inserted is fr... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to use C# to write an xml document to MemoryStream, not a file?
Posted by Jackfan at 7/20/2004 9:57:03 AM
I'm using XmlTextWriter now, but it seems it can just be used to create a
xml file, how can I do?
Thanks in advance!
Jackfan
... more >>
xsl:value-of select doesn't like "($variable)" expressions; bug?
Posted by Alistair Bayley at 7/20/2004 6:04:05 AM
(.Net framework version 1.1.4322)
The following XSL test case is rejected by System.Xml.Xsl.XslTransform, with an XsltException: "($dummy)+0 is an invalid XPath expression." If you remove the parentheses then it is happy. This appears to be an error; see http://www.w3.org/TR/xpath#NT-Expr. The pa... more >>
excel-->XML-->SQL
Posted by Jano at 7/20/2004 12:23:01 AM
Hi all,
I support a number of applications that store info in backend SQL databases. A project has come up where I need to get data out of Excel into one of these databases, using XML/XSLT. I am a beginner in XML/XSLT so was hoping someone would be able to give me some good info/tips on how to d... more >>
Changing machine gives XslTransform error (ArithmeticException in mscorlib.dll followed by XsltCompileException in system.xml.dll)
Posted by ronald NO[at]SPAM calleva.com at 7/19/2004 3:34:49 PM
I just wrote some code on a dev machine,
Imports System.Xml
Imports System.Xml.XPath
Imports System.Xml.Xsl
Imports System.IO
Imports System.Data.SqlClient
Public Class ClassXMLtoHTML
Dim myXslTransform As XslTransform
Sub New(ByVal strXSL As String)
Me.myXslTransform = N... more >>
XPathNavigation and Namespaces.
Posted by Hollywood at 7/19/2004 1:18:05 PM
I have the following code that is attempting to read nodes from an xml
file...
XmlDocument xpdStatus = new XmlDocument();
xpdStatus.Load("status.xml");
XPathNavigator xpnStatus = xpdStatus.CreateNavigator();
XPathNodeIterator xpniStatus = xpnStatus.Select("descendant::Status");
while (xpni... more >>
XmlTextReader instances - help
Posted by Timothy V at 7/19/2004 11:58:11 AM
Hi,
When you create an instance of an XmlTextReader and give it a file to open
(constructor), does it automatically close the file when the destructor is
invoked (ie. automatically invokes method Close() when destructing)? Or do I
have to invoke the Close() method myself to close the file?
... more >>
XSDObjectGen error
Posted by Pavan at 7/19/2004 3:51:02 AM
Hi, I received an error from a schema using the much hyped XSDObjectGen:
Unexpected error occured in XSDObjectGen : Specified cast is not valid.
Please send the schema to support.
However xsd.exe (.NET v1.1) worked ok (did'nt give an error).
I wonder how long we'll have to wait before we g... more >>
Controlling SOAP formatting
Posted by Bob Rundle at 7/18/2004 10:10:32 AM
I can't seem to control the soap formatting. SoapTypeAttribute() doesn't
seem to have any affect on the SOAP serialization. Here is my sampe code.
What am I doing wrong?
Regards,
Bob Rundle
using System;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.S... more >>
Confused About Validation
Posted by Wayne Wengert at 7/17/2004 10:39:07 AM
I have an XML document and a corresponding xsd document I built. I want to
validate the xml document against that Schema but when I use the MSDN
validator it has no place to select the xsd document? It has a checkmark for
"Validate" but I have no idea what it is using as the Schema?
Where can ... more >>
deserialize a collection
Posted by Greg at 7/16/2004 3:05:02 PM
I'm writing a class in C# ....
I have a collection calls Reports made up of Report objects. I'm trying to deserialize an XML file that looks like :
<Reports>
<Report>
<Title>some title</Title>
<Notes> some notes </Notes>
</Report>
<Report>
blah blah blah
... more >>
Where can I get a FREE XPath Generator?
Posted by Don at 7/16/2004 2:36:08 PM
XmlSerializer and IEnumerable
Posted by Bob Rundle at 7/16/2004 1:07:28 PM
I'm trying to serialize a class with XmlSerializer. This class implements
the IEnumerable interface. I implemented the IEnumerable interface for
reasons other than Xml serialization.
However I find that the XmlSerializer, because I have an IEnumerable
interface on this class, wants to ignore... more >>
XslTransform from one XmlDocument to another...
Posted by Graham Pengelly at 7/16/2004 11:22:14 AM
Hi
I am trying to transform on System.Xml.XmlDocument into another using
XslTransform without writing the object out to a file. I am guessing it
should work something like this...
public XmlDocument TransformXmlDoc(XmlDocument docToTransform, string
xsltFilePath)
{
//load the xslt
X... more >>
Problems Serializing A Collection Object
Posted by dotNetDave at 7/16/2004 9:10:02 AM
I'm trying to create xml seriaizable collection class (below), but the xml keeps coming out wrong. In the resulting xml from the web service (below) the "ArrayOfAlarmProcessor" tag should really be "Processors" and the "AlarmProcessor" tag should be "Processor".
<ArrayOfAlarmProcessor xmlns:xsd=... more >>
what is the language similar to XML
Posted by shoa at 7/15/2004 9:00:14 PM
Hello all
Could you please tell me if there is any language that has the same
functions as XML - the language for documents having structures. In other
words, what are languages for documents that have structures. I know that
one of them is Dublin Code. What else, please help !!!
Many thank... more >>
XPath with namespace
Posted by kyx368 NO[at]SPAM hotmail-dot-com.no-spam.invalid at 7/15/2004 3:20:15 PM
Hello all,
I am working on an Add-in to the .NET framework using C#. I wanted to
search the XML document using XPath but failed.
The XML is like this:
<unit xmlns="http://www.some.info/srcML"
xmlns:cpp="http://www.some.info/srcML/cpp">
<aaa>something</aaa>
</unit>
The code I am using ... more >>
Performance of XPathNavigator.Matches()
Posted by Steve Taylor at 7/15/2004 2:49:53 PM
I'm experiencing bad performance with certain kinds of match queries. Using
a custom XPathNavigator that wraps the usual navigator I can see that many
more node visits are performed than should be required. My document looks
something like this:
<a>
<b>
<c/>
</b>
<b/>... more >>
Formatting Date
Posted by Wayne Wengert at 7/15/2004 1:05:53 PM
I want to create a HTML page from an XML document using XSLT. The date
values in the XML document are in the ISO format. I want to have the web
page display something like "7/15/2004" for the date and in another case I
want "HH:MM" for time of day. Can anyone point me to some resources
explainin... more >>
How to put an XML called from an URL into a Recordset
Posted by Robson Carvalho Machado at 7/15/2004 4:24:17 AM
Dear friends
I'm using the below code that uses a fixed xml file
like "news.xml"
I would like to know how to put an XML called from an URL
into a Recordset.
Is there a way to read data from an URL?
Something like http://www.xpto.com/news.xml
Dim objRS
Set objRS = Server.CreateObj... more >>
XSD schema "union" and "list" in datasets
Posted by tfj NO[at]SPAM email.dk at 7/15/2004 1:35:58 AM
Hi,
Accroding to MS documentation the use of union and list elements in
XSD simpleType (valid according to W3C standards) is valid used as an
dataset schema...but it's not!!
When loading the schema (ReadXmlSchema method) you get this error
message:
doesn't support 'union' or 'list' as simp... more >>
Reading XML attributes with C#
Posted by Mystique at 7/15/2004 12:52:41 AM
Why do I always get '0' for attribute when i have tags like:
<GNRS someAttribute="12">Some Text</GNRS>
I read the attribute with:
aReader.GetAttribute("someAttribute");
where aReader is a XmlTextReader type
... more >>
|