all groups > dotnet xml > may 2004
Filter by week: 1 2 3 4 5
XmlElement question
Posted by Timothy V at 5/31/2004 11:59:28 PM
Hi,
I have and XmlElement from within an XmlDocument. I wish to RemoveAll() from
within the XmlElement plus itself. For example:
<Notes>
<Note id="n1">
<Info>A message</Info>
</Note>
<Note id="n2">
<Info>another message</Info>
</Note>
</Notes>
I wish to delete the nod... more >>
which xml access type?
Posted by Timothy V at 5/31/2004 9:21:12 PM
Hi,
I'm developing an ASP.NET web app and i'm retrieving some data from xml
files.
My question is, if an xml file is going to be accessed a page is loaded,
should i:
1. use an in-memory XmlDocument (created each time the page is accessed); or
2. use a forward-only XmlTextReader object (cre... more >>
Internal problem on XmlDocument.Load( )
Posted by Whugster at 5/31/2004 3:21:01 PM
I have this really frustrating problem when calling XmlDocument.Load(string
filename). Whenever I call this method in a web application in my Windows XP
development PC, I get the following error:
Specified argument was out of the range of valid values. Parameter name: The
specified value must ... more >>
Xml Serialization Intermittent Failure
Posted by Robert at 5/30/2004 6:41:02 PM
We have an ASP.NET site that performs a lot of xml serialization. The serialization occurs in the lbolibrary dll. Occasionally we get an .out file produced in the Winnt\temp folder that contains the following:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /t:library /ut... more >>
Inheritance in XSD?
Posted by Bill Cohagan at 5/30/2004 12:25:43 AM
I'd like to define a schema that allows, for example, a "table" element that
takes on one of two forms distinguished by what attributes are present. For
instance,
<table foo="3"/>
<table bar="5"/>
Note that I want to exclude <table foo="3" bar = "5"/>; i.e., using *both*
attributes shoul... more >>
XPath - retrieving various elements
Posted by Mike at 5/29/2004 3:51:55 PM
Hi,
I am new to XPath and I am stuck with an expression. I would like to =
select all servers which the user subscribed to. Here is my XML:
<forums>
<forum>
<name>AAA</name>
<subscribed>1</subscribed>
</forum>
<forum>
<name>BBB... more >>
XPath
Posted by Mike at 5/29/2004 3:45:05 PM
Hi,
I am new to XPath and I am stuck with an expression. I would like to =
select all servers which the user subscribed to. Here is my XML:
<forums>
<forum>
<name>AAA</name>
<subscribed>1</subscribed>
</forum>
<forum>
<name>BBB... more >>
Xsd and serialisation
Posted by questions NO[at]SPAM resolutionsnet.co.uk at 5/29/2004 3:09:53 AM
hello,
I wonder if anyone can help me.
I have used xsd to generate a c# class from an xml file.
This class is currently being used in my application and works
perfectly ok when stored in InProc session.
But when moving to StateServer, it throws the "Unable to serialize the
session s... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Where can I find a BerkeleyDB XML for .Net || Has anybody found anything about .Net and BerkeleyDB
Posted by RikardN at 5/28/2004 11:16:10 PM
Hi,
I am looking for any information regarding BerkeleyDB XML for .NET or if
anybody have
information regarding an alternativ (free) to BerkeleyDB XML for storing XML
and using XQuery.
(Yes I have looked at http://www.sleepycat.com)
I have found the samples in the download
(http://www.m... more >>
MC++ & C# generate different XML
Posted by Lidström at 5/28/2004 2:26:50 PM
Hi,
I've been trying a long time now to generate some XML using MC++ and
XmlSerializer. I have a piece of C# code that produces exactly what I want,
but I simply can't get the MC++ code to write the same thing. Below I have
included two minimal compilable samples that illustrate my problem.
... more >>
Validating and XML file with a schema
Posted by Robert Reineri at 5/28/2004 12:55:00 PM
Hello,
New to the XML world and .NET. I have what I believe to be a simple problem,
but I have read the .NET docs till I'm blue in the face and still can't
locate a simple example of how to accomplish this.
I have two strings (C# string type).
One of them contains an XML document.
The othe... more >>
string XML transform
Posted by Owen at 5/28/2004 11:46:55 AM
Hello:
I have some xml and xsl in string, "not in file". I want to transform the
xml with xsl and the result I want in string (but in xml format). I read
this sample :
public class Sample
{
private const String filename = "mydata.xml";
private const String stylesheet = "myStyleShe... more >>
Output escaping with XSL
Posted by Paul Hatcher at 5/27/2004 1:55:47 PM
Hi
I'm transforming some XML to HTML but the via XslTransform and a
StreamWriter, but I can't get it to obey <xsl:text> escaping rules.
I have a statement
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
but I get &nbsp; in the output rather than
If I do this... more >>
Serializing DateTime
Posted by Lidström at 5/27/2004 10:55:44 AM
How do I serialize a DateTime attribute to HH:MM:SS? I've tried this:
[XmlAttributeAttribute(AttributeName="time", DataType="time")]
But it is serialized as time="10:45:34.7031250+02:00". I would like it to
be plainly "10:45:34". I will not be doing any calculations on the time,
just record ... more >>
Create Login in asp.net using XML
Posted by m_skreiberg NO[at]SPAM hotmail.com at 5/27/2004 5:12:32 AM
Hi.
I'm trying to create a login page in asp.net using information from an
XML document. (visual basic)
I've tried Rowfilter to find a cell with the 'username' and then match
this with the 'Password' cell on the same row.... -> allow page to
redirect if these match:
If 'username' match '... more >>
encoding="ISO-8859-1" and XML (.Net CF)
Posted by ongg NO[at]SPAM w-linknospam.net at 5/27/2004 1:38:27 AM
Hi,
I'm using .Net CF, and I'm trying to load an XML document that has a first
line:
<?xml version="1.0" encoding="ISO-8859-1"?>
I'm loading this via XmlDocument.Load(). However, I get and XmlException
with no real good useful info:
An unhandled exception of type 'System.Xml.XmlException' o... more >>
XML Stylesheets
Posted by Richard L Rosenheim at 5/26/2004 11:41:45 PM
I need to create some XML stylesheets to transform some XML data into HTML
pages. So, I'm looking to improve my understanding of XML stylesheets.
I do have a book, "Professional Visual Basic 6 XML" which has a chapter on
stylesheets, but I'm finding it a little hard to understand. I also foun... more >>
Convert a WML document to HTML using Word2HTML.xsl
Posted by Henrik Skak Pedersen at 5/26/2004 6:44:42 PM
Hi,
I am trying to convert a very basic WML document to HTML using the
word2HTML.xsl stylesheet. But I get an exception when I am trying to convert
it:
The code looks like this:
XPathDocument xpathdocument = new XPathDocument(docFileName);
XslTransform xslt = new XslTransform();
xslt.Lo... more >>
xmlTransform transform <xsl:number> - possible Bug
Posted by b0yce at 5/26/2004 5:40:22 PM
Hi Group,
I think I have found a problem with the <xsl:element> when being
transformed by the .NET xmlTransform class. When using XmlSpy for
development and debugging, the <xsl:number> subsitutes the position of the
node correctly as I expected. This is fine with MSXML 3.0 & MSXML 4.0 plus... more >>
xpath wildcard: ANY offspring match
Posted by darrel at 5/26/2004 10:40:24 AM
I'm still struggling with xpath syntax.
I'm creating a menu via XSLT that checks to see if any given node has a
descendant somewhere down the chain that is the 'current active page' and,
if so, then it should display itself.
I've been using this for my syntax:
<xsl:if test="page/linkID | ... more >>
Encoding problem
Posted by Greg at 5/25/2004 5:35:12 PM
Hi all,
I'm using the XmlDocument class to create an XML document. I found out that
in .NET there are special classes that they do that job a lot faster,
namelly XmlTextWritter. My problem is that using the XmlTextWritter the
encoding gets messed up.
How do I set the XmlTextWritter's ecncod... more >>
cannot load schema for the namespace
Posted by Ian Emery at 5/25/2004 4:31:35 PM
Hi,
I am trying to validate an XML file using the XmlValidatingReader and
XmlUrlResolver.
The code for which goes like this:
// Read the XML file.
XmlTextReader xmlReader = new XmlTextReader( _PathToXMLDoc);
XmlValidatingReader valReader = new XmlValidatingReader(xmlReader);
valReade... more >>
Lost in XPath
Posted by Tom Clement at 5/25/2004 4:17:57 PM
I really believe it's possible to do what I want with a SelectNodes() XPath
query, but I'm lost. Any help would be appreciated. Suppose you have an
XML document (like a WordProcessingML file) that has a bunch of elements
embedded in it that conform to a schema, but each schema-defined
parent/c... more >>
Custom Configuration management for app.Config
Posted by tronicsolution NO[at]SPAM yahoo.com at 5/25/2004 2:24:19 PM
Hi,
I created a custom Section handler using System.configuration for Web
application to read from Web.Config File.
If I want to use the same handler to read from app.config file:
app.config is not interpreted as XML file, & the code breaks.
Here is the sample of the logic.
For Each nod... more >>
Question about attributes
Posted by Developer at 5/25/2004 12:47:23 PM
Hello,
I'm experimenting with and XmlTextReader sample, and don't understand how
the attributes are being processed.
Here's the input:
<xsd:element name="AA" type="BB" substitutionGroup="CC"/>
The code:
while (reader->Read())
{
switch (reader->NodeType)
{
/... more >>
Export data in XML through Web Services
Posted by Massimo Rizzotto at 5/24/2004 7:06:57 PM
I have a WebMethod that retrive data from a DB and I want to return this
data in a XML format.
I try to do with the TextWriter class but I wasn't able to do, because I
didn't found any example thet explain how to use the Stream attribute.
Can I use the TextWriter or I have to use the XmlDocument... more >>
Problems with SelectSingleNode
Posted by Colin Young at 5/24/2004 10:13:03 AM
I have the following XML ('Offer' only appears once in the XML):
<OfferSheetXML xmlns="http://localhost/GBWPipeline/OfferSheetSchema.xsd">
<Offer>
<OfferSheetId>31</OfferSheetId>
[...]
</Offer>
</OfferSheetXML>
If I want to use the SelectSingleNode method of the XmlDocument object... more >>
XmlSerializer - XmlTextReader vs. XmlNodeReader
Posted by Andy Neilson at 5/24/2004 9:29:11 AM
I've run across a strange behaviour with XmlSerializer that I'm unable =
to explain. I came across this while trying to use XmlSerializer to =
deserialize from a the details of a SoapException. This should have =
worked fine since the class in question was already being serialized and =
deserial... more >>
How to add new node with value?
Posted by Lupina at 5/23/2004 10:24:24 PM
I want to create new node, and then save it to file.
I can add empty node with attributes, but I don't know how set new value for
the node:
String *strMake = this->txtMake->Text;
String *strModel = this->txtModel->Text;
XmlDocument* XmlDoc = new XmlDocument();
try {
... more >>
How to read certain node from xml
Posted by Lupina at 5/23/2004 6:32:09 PM
I want to read certain node from xml file by the ID.
It means taht I know the ID of person, and I want read all data that person
(eg: name,mail...).
persons.xml
<?xml version="1.0"?>
<persons>
<person>
<id>1</id>
<name>Tom</name>
<mail>tom@tech.com</mail>
</person>
<person>
... more >>
Saving xml with accentuated characters
Posted by Cesar Ronchese at 5/23/2004 5:06:06 PM
Hello, All!
I'm working with accentuated characters in my XML files, and I have found
problems to load and save it.
First, for this case, I always have my XML in memory, and I load it via
LoadXML (please, ignore incorrect concatenations for this sample):
Dim cXml As New Xml.XmlDocument
... more >>
XML Dataset editor
Posted by Eric at 5/23/2004 4:35:39 PM
Hi,
I am making a flash card type program for the PocketPC. I am using a dataset
to contain the cards, all of that works great.
I thought I would just import the XML into word or excel, copy/paste the
data from other sources or add new records, and then save it as xml. As i
have Office XP,... more >>
Converting an XML documentation file to a help file
Posted by Chris Morrison at 5/23/2004 2:50:12 PM
Hi all,
This may seem like an obvious question.
How do I convert the XML documentation file that the C# compiler emits from
my XML comments into a help file for the Microsoft Document Explorer?
Is there a tool program or something that I am missing? I cannot find
anything in any of the ... more >>
param syntax help
Posted by darrel at 5/21/2004 5:19:30 PM
Why does this work:
<xsl:for-each select="//page[@subSite='monkey']">
but this does not?:
<xsl:param name="subSite">monkey</xsl:param>
<xsl:for-each select="//page[@subSite='$subsite']">
... more >>
XPath contains() function
Posted by sprungli at 5/21/2004 4:31:09 PM
My goal is to select some XPath nodes based on whether their values (text)
contain a string passed as argument. To achieve this I use the contains()
function of XPath in an XpathExpression.
For example, given the following fragment...
<code>
<Exprs>
<Expr>red fox</Expr>
<Expr>ju... more >>
Need help merging documents
Posted by Robert Strickland at 5/21/2004 4:08:48 PM
I need to merge 3 or more xml streams (I have 4 string variables that
contain xml) into a single xml stream before doing a transformation. Is
there any sample code or site to show the way?
Thanks
... more >>
need help/cheat sheet on xsl match commands
Posted by darrel at 5/21/2004 2:46:16 PM
I'm struggling to keep track of all the ways to format a match value. Can
anyone recommend a decent overview or cheat-sheet?
Here's the particular one I'm stuck on:
I want to match any 'page' tag with the attribute of the subSite param.
I've tried this:
//page[@subSite=$subSite]
but ... more >>
Parsing with unqualified Namespace
Posted by Erik Moore at 5/21/2004 2:36:29 PM
I am both producing and parsing an xml document that needs to be validated against a schema. I wanted some consumers of the document
to have the option of not performing a validation, so I left the nodes in the instance unqualified. An example of the document is
below:
<?xml version="1.0" encod... more >>
XMLDocument character encoding
Posted by Eric Cadwell at 5/21/2004 2:10:11 PM
We are encoding strings using XMLElement:
private string XMLEncode(string val)
{
if(val.Length == 0)
return string.Empty;
XmlElement element = xmldoc.CreateElement("E");
element.InnerText = val;
return element.InnerXml;
}
The question is what encoding is being ... more >>
Removing XML Element. Simple??? Give me your trick please
Posted by GhislainTanguay at 5/21/2004 11:10:21 AM
This is my XML file and below you will find my code to remove it... I was
thinking that it's a simple task but this code doesn't work.
Anybody have a better solution?
<Advertisements>
<Ad>
<ImageUrl>http://localhost/UQCN/Images/Ecoroute.gif</ImageUrl>
<NavigateUrl>/UQCN/WebMo... more >>
Tutorial
Posted by Peter Morris [Droopy eyes software] at 5/21/2004 8:00:16 AM
Hi all
Can anyone point me to a good tutorial for XML in .NET? Also XSD and XLST +
some info on XPath would be useful.
Thanks
Pete
-------
http://www.HowToDoThings.com
Read or write articles on just about anything
... more >>
Getting XML out of Dataset
Posted by Richard at 5/21/2004 4:31:03 AM
Hi
Is it possible to define exactly what format the XML takes when you create it from a Dataset. I have defined a XML schema but the XML I get from the Dataset (which is a strongly typed dataset using my XML schema) doesn't use this schema ie I get the standard element type xml document.
Regar... more >>
The data at the root level is invalid. Line 1, position 1
Posted by Deena at 5/21/2004 2:04:44 AM
I pulling my hair out with is error!
I've used an external source to validate my schema against
the xml and it succeeds without any errors
(http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.as
px) but as soon as I run it through some code it pops up
with that error!
Here's my code:... more >>
Creating XML DataSet from scratch
Posted by Chris Kennedy at 5/20/2004 8:57:18 AM
How do create a dataset from scratch based on an XML schema. This will not
be filled by a dataadapter. It will be a dataset which I add rows to and
then save as an XML file. All the example depend on filling the dataset. I
have also tried creating it from the XML schema but I am having problems
... more >>
Problem using XmlTextReader and XmlTextWriter.
Posted by Pete at 5/19/2004 10:42:32 PM
I'm trying to read an XML document and write out a slightly modified
version using the XmlTextWriter.
I'm basically trying to copy all the nodes exactly as they are read and
do some text manipulation on #text nodes of only certain named elements.
example
while (xmltextreader.Read())
{
... more >>
Serializing array of userdefined types
Posted by Lidström at 5/19/2004 12:09:36 PM
Hello,
I want to have a class that contains only a collection of another class.
For example:
public __gc class Alignment {
public:
Alignment();
...
};
// Probably using XmlIncludeAttribute such as this is wrong...
[System::Xml::Serialization::XmlIncludeAttribute(__typeof(Alignment... more >>
Controlling order of serialization
Posted by Lidström at 5/19/2004 11:18:51 AM
Hello,
how can I control the order of which elements are serialized. For example,
my class looks like:
public __gc class Author {
public:
Author();
// get/set methods
[System::Xml::Serialization::XmlAttributeAttribute("createdBy")]
__property System::String* get_c... more >>
XslTransform/XmlWriter can't encode   in us-ascii or iso-8859-1
Posted by smr NO[at]SPAM essemer.com.au at 5/19/2004 4:47:00 AM
My problem starts with wanting " " to actually appear that way in
the output rather than an actual encoded 0xA0 byte in the output
stream. I thought a way to solve this would be to select us-ascii or
iso-8859-1 as the output encoding, and so used this line in the
stylesheet:
<xsl:out... more >>
XPath: Is there a better way to do this...
Posted by David Elliott at 5/18/2004 3:44:13 PM
I am retrieving XmlSchema from a database and need to find the nodes that represent the Table and Column names.
I have included a sample Xml Schema and the code I used to find the information. As this is the first time I have
even attempted to use XPath, I was wondering if the code I provided is ... more >>
Does XmlValidatingReader check key and keyref constrains?
Posted by Dmitry Martynov at 5/18/2004 2:58:22 PM
Hi
I have a question
whether XmlValidatingReader doesn't check keyref constrain (the same with
key constraint) or I do smth wrong.
I have the following schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="module" targetNamespace="http://tempuri.org/module.xsd"
xmlns="http://temp... more >>
|