all groups > dotnet xml > june 2004
Filter by week: 1 2 3 4 5
Reading and writing an XML file
Posted by Marco Rispoli at 6/30/2004 10:06:03 PM
Hello folks!
I have to read an XML file, add some elements and write it back.
I seem to have no problem doing the first 2 things but then I get
The process cannot access the file "c:/file.xml" because it is being used by
another process.
... when I try to do the third thing: saving.
... more >>
XPathNodeIterator.Current.GetAttribute
Posted by John A Grandy at 6/30/2004 9:16:09 PM
XPathNodeIterator.Current.GetAttribute(localName As String, namespaceURI As
String)
i believe that localName should be set equal to the name of the attribute.
but what should namespaceURI be set equal to ?
... more >>
removing nodes from xmldocument
Posted by e-mid at 6/30/2004 7:23:09 PM
Here is an xml structure. i want to remove <a> nodes that do not have any
child. How can i do that in csharp?
<root>
<a>
<b/>
</a>
<a/>
<a/>
<a>
<c/>
</a>
</root>
i tried following but it does not work:
xmlNodeList l = xr.getElementsB... more >>
Passing XML to webservice
Posted by elmerblues71 NO[at]SPAM hotmail.com at 6/30/2004 8:06:38 AM
I have a customer who wants to send us a XML message like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<PurchaseOrder xmlns="http://tempuri.org/">
<OrderHeader>
<PONumber>10464</PONumber>
... more >>
Newbie needs a tutorial on reading from and writing to nodes in an XML file
Posted by David Hearn at 6/30/2004 7:58:26 AM
I have an ASP.NET app that I am writing using VB.NET and I want to use an
XML file to store configuration settings in sort of like the way I used to
use an .INI file for in Windows apps. When the user opens a page, it needs
to go read certain settings out of the file and fill textboxes and oth... more >>
Path of an XML node
Posted by The Clansman at 6/29/2004 8:04:49 PM
Hi,
how do I get the path of an XML node?
I have:
Dim xmlNo As XmlNode = xml.SelectSingleNode("//Category[@Id='" & CategoryID
& "']")
I want to get the path of the xmlNo:
i.e.
Categories\Video games\Nintendo 64\Games\
thanks,
Bruno
... more >>
using appendChild using XmlDocument without indentation
Posted by TS at 6/29/2004 11:27:23 AM
HI, is there any option while using appendChild so that it doesn't do the
autotomatic indentation and line breaks so that the tags are appended back
to back?
thanks
... more >>
XmlSerializer Collection with Collections
Posted by yurps NO[at]SPAM yahoo.co.uk at 6/29/2004 8:56:26 AM
Hello I got this working but it is not how I really want it, basically
I have an xml file which has a root of <test> and can be filled with 3
different types of <question> elements with different attributes, all
share a base set of 4, one of the question types can have children
with <option> ele... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How do you generate classes from an .xsd file?? newbie question
Posted by burak.gunay NO[at]SPAM xpandcorp.com at 6/29/2004 8:22:38 AM
Hello,
I am working on a VB.NET web service that will be used to send and
receive job openings.
I found a site called "hr-xml consortium"
"The HR-XML Consortium is an independent, non-profit organization
dedicated to the development and promotion of a standard suite of XML
specificat... more >>
XML as database for CD Gallery???
Posted by SStory at 6/28/2004 4:46:06 PM
I am creating a CD that will have various product images. I need more
information on these JPG's so I will need some sort of data on each of them.
I will also need to be able to find these images by keywords, title,
subject, etc....sort of a gallery.
I was considering trying to use XML to av... more >>
Passing node-sets as parameters?
Posted by Alfred Taylor at 6/28/2004 3:08:09 PM
I essentially need a countif() function for xsl. Something to where I could
do countif(node-set, condition). Rather than try to get too extreme, i
decided to just write one for my countif() with the condition hardcoded.
(this was also my first venture into creating "functions")
Pseudo-code i... more >>
Datset mapping to element/attribute
Posted by mid at 6/28/2004 2:31:50 PM
Hello!
First please understand tha my xml knowledge is very very short. I'm new at
xml world.
I need to understand how do I map a given sqlColumn to a xml element or
attribute.
I was given a XSD that has a certain number of elements and attibutes. This
XSD was provided by another company... more >>
reading small XML file with HUGE DTD (MathML / entities)
Posted by Michel de Becdelièvre at 6/28/2004 2:24:15 PM
I have some *performance* trouble reading MathML files in my application (in
ASP.Net).
- I have small MathML files (2-3k) as input
- as (almost) all MathML files these use entities. I have no way to restrict
the entities used.
- to read an XML file entities into a document, you need to use a ... more >>
Web Service returns 404
Posted by septemberweir NO[at]SPAM yahoo.com at 6/28/2004 10:56:38 AM
I have read numerous posts on this same issue and searched Microsoft's
knowledge base and there are no solutions offered.
I have a web service installed on 4 machines: 2 dev servers, 1 staging
and production. The web service works fine on 3 of the machines,
however, on one dev server, invokin... more >>
Transfrom() issues with xsl:document() function
Posted by Mike at 6/28/2004 7:25:15 AM
I'm getting a strange result when I reference an external
xml document in my XSLT. The transformation work's fine in
Xselerator, but not in .NET. It looks as though I'm
getting garbage in the output. Here's the relevant portion
of the xslt:
<?xml version="1.0"?>
<xsl:stylesheet version="... more >>
reading inner html with xpath
Posted by Lawrence Oluyede at 6/27/2004 7:43:26 PM
Is there a way to treat html tags like simple text?
I explain myself, if I have a bunch of xml like
<content type="application/xhtml+xml"
xml:base="http://loluyede.blogspot.com" xml:lang="en-US"
xml:space="preserve">
<div xmlns="http://www.w3.org/1999/xhtml">I have 3 accounts to give away,
... more >>
selecting specific elements with xpath
Posted by Lawrence Oluyede at 6/27/2004 11:34:05 AM
I've some problems with filtering out a specific element by the following
xml snippet (is part of a bigger xml document):
<entry>
<link href="http://www.blogger.com/atom/5281182/108809850419059234"
rel="service.edit" title="test" type="application/x.atom+xml"/>
<author>
<name>Lawrence</nam... more >>
XPath and GetAttribute
Posted by the_banski NO[at]SPAM hotmail.com at 6/27/2004 9:00:20 AM
Hi,
Im quite new to XML in .Net.
Im getting values from an xml file using XPath and sorting as you see
in the code below.
I cant figure out how to get the value of date with GetAttribute.
Hope that this short description if enough and you can help to sort
out this problem.
Thanks in advan... more >>
Matching preceding-sibling axis is SLOWWWW!
Posted by Bill Cohagan at 6/26/2004 4:00:20 PM
I have an XSLT transformation that involves a template with
match =
"w:p[ancestor::w:body][preceding-sibling::*[1][self::aml:annotation/@w:type
= 'Word.Bookmark.Start']]"
What I'm matching on is a w:p element that is:
1.) Within a w:body element (at some level).
2.) Immediately preceede... more >>
xslt not working with schema file associated
Posted by Philip Rayne at 6/25/2004 11:27:50 AM
Probably a bit of a newbie question this. I have an XML file like this:
<?xml version="1.0" standalone="yes"?>
<AuditLogonGroup xmlns="http://tempuri.org/AuditLogon.xsd">
<AuditLogon>
<Username></Username>
<IPAddress></IPAddress>
</AuditLogon>
<AuditLogonGroup>
I have a XSLT... more >>
XmlNodeList - how to find out index of node in original child collection?
Posted by Marina at 6/25/2004 10:57:07 AM
Hi,
Given a node, how can one find out its index in the collection of nodes it
belongs to?
Thanks
... more >>
XSL Transform - can't get it to work
Posted by dnlwhite NO[at]SPAM dtgnet.com at 6/24/2004 3:02:21 PM
I'm learning how to use the XSL transform functionality and can't get
it to work. In a book I'm reading on it, it says that I can do like I
did below and just add a value like <root_node/> in there and I should
be able to transform any XML source document I have so that the
results would simply... more >>
Sending XML Image
Posted by Rob T at 6/24/2004 2:19:34 PM
Hi, I'm trying to send an image over XML. My routine gets the name, then
gets the image out of a SQL database. This part works fine... but the XML
returns the object, I get the following error: "System.Drawing.Bitmap
cannot be serialized because it does not have a default public constructor."... more >>
Issues when validating xml in VS2003
Posted by Tomas Rivas at 6/24/2004 11:38:10 AM
I am trying to validate an xml file and schema and when I
am trying to validate I am getting the following error. I
have been trying to come out with a solution but I have
failed so far. The document validates ok in xmlSpy but it
fails in VS2003. Is there any article or fix for this?
Thna... more >>
Looping through XML in asp.net
Posted by BeWyched at 6/24/2004 3:52:01 AM
I'm trying to extract data from a simple XML document that holds the data in 2 levels by looping through the levels. Simplified code is:
Dim doc As New XmlDataDocument
Dim strngs As String, strng1 As String, strng2 As String
Dim Node1 As XmlNode, Node2 As XmlNode
strngs = "<ABC><XYZ>Smith<... more >>
Problem with collection classes
Posted by Lidström at 6/23/2004 5:10:31 PM
Hi,
how do I synchronize (to XML using XmlSerializer) something to this:
<Alignments name="Road Project">
<Alignment name="Centerline">
<CoordGeom>
<Line staStart="0">
<Start>2000 6000</Start>
<End>2186.841 6068.005</End>
</Line>
<Curve rot="cw" />
... more >>
Validating WSDL-Files
Posted by put NO[at]SPAM gmx-dot-at.no-spam.invalid at 6/23/2004 12:05:18 PM
Hi
I have a problem with validating WSDL-Files using XMLValidatingReader.
I'm adding all schemas in the <definitions>-Tag to the
XmlValidatingReader.Schemas Property.
and here is the Problem: Some wsdl-Files that should work(according to
XMLSpy) produce ValidationErrors when:
1. The l... more >>
Converting PostedFile to an XMLDocument.
Posted by Thomasa Gregg at 6/23/2004 10:43:12 AM
I need to convert an HTTPPostedFile I am getting from the client to an
XMLDocument. The class I am using must have a document. The following
gives me an error when I try and build. I cannot change the converting
class.
Any help would be appreciated.
The error is:
Value of type 'System.W... more >>
Strange behaviour with identical XmlNode.SelectSingleNode(xpathQuery) queries
Posted by runerei NO[at]SPAM yahoo.no at 6/23/2004 5:07:29 AM
I have two queries that appear to be exactly the same, but one of them
returns null while the other one returns a valid result!
Can anyone provide an explanation to why this is so? Below is an nunit
test that exposes the problem. I have run the test under both the 1.0
and 1.1 framework with the ... more >>
Schema Valdiation error
Posted by nepo NO[at]SPAM online.nospam at 6/22/2004 6:07:01 PM
I try to validate a complex schema using XSD and I get a series of errors of the following format:
Validation Error:'http://xml.msdw.com/ns/mdco/data/1.0:tradeSymbol' cannot be a member of substitution group with head element 'http://xml.msdw.com/ns/mdco/xml/2.0:abstractIdentifier'.
An error oc... more >>
remove nodes that belong to a namespace
Posted by Nikhil Patel at 6/22/2004 5:15:26 PM
Hi all,
Following is a portion of an XML document. I need to remove all nodes
that belong to ns0 without deleting their child nodes. So in the following
example , I want to delete "ns0:Proposal" and "ns0:Company" but I do not
want to delete their child nodes("w:p","w:r","w:t"). How can I do t... more >>
replacing nodes
Posted by Nikhil Patel at 6/22/2004 1:29:31 PM
Hi all,
Following in a portion of an xml document. I would like to replace
"nso:Proposal" node with its child "w:p" node programmatically. How can I do
this?
Thanks.
<ns0:Proposal>
<ns0:Company>
<w:p>
<w:r>
<w:t>test company</w... more >>
Using XmlSecureResolver.CreateEvidenceForUrl?
Posted by rene.de.vries NO[at]SPAM kex.nl at 6/22/2004 12:22:13 PM
I am having trouble getting a transformation to work. Basic
transformation
works locally - i.e. if I have the XSL on a local system it all works
as it
should. My XSLT uses references another external XML document.
When I move the XSLT to a UNC it stops pulling in nodes from an
external
XML,... more >>
Parse/convert "True" or "False" to boolean?
Posted by Bradley Plett at 6/22/2004 8:58:02 AM
I have what should be a trivial problem. I am using XMLSerializer to
serialize an object. It serializes boolean values as "True" and
"False". I then want to use an XSLT on this XML, and I want to use
one of these booleans in a test. How do I convert one of these to a
boolean in a test?!? I ... more >>
How to call another file in your xml document.
Posted by Hemang Shah at 6/22/2004 1:08:38 AM
Greetings.
I have an app which calls "text.xml", which is stored on a network share.
Each user has different text requirements.
what I want is for "text.xml" which is stored on the network, to read a file
locally on the user's macine (i.e. c:\localtext\text.txt) and populate it
with the loca... more >>
Write OpenFileDialog.FileName to XML file
Posted by Koala Beer at 6/21/2004 4:13:47 PM
Hi,
Here is something I can't figure out what I am doing wrong:
I use a OpenFileDialog to select a file. I put the result string from
the FileName property in a textbox on my form. Later on I save the
..Text property to an xml file. Nothing happens, the filename is not
writen to the xml fil... more >>
Flags style enum?
Posted by Keith Hill at 6/21/2004 3:44:24 PM
Is there a way to represent a [Flags] style enum in XML Schema? Say I have
a flags enum like so:
[Flags]
public enum dayOfWeek {
Mon,
Tue,
Wed,
All = Mon | Tue | Wed;
}
I'd like to have my XML be able to use an element attribute like so:
<SomeElement dayOfWeek="Mon|W... more >>
XSLT: Loading Single Image Multiple Times
Posted by Larry Marburger at 6/21/2004 12:06:02 PM
I've built and XSLT that is used to generate a simple TreeView-type,
web-based control (ASP.NET / C#). When the tree is fully transformed
(client-side, JavaScript transformation), there are about 5 different
images that are referenced (page.gif, folder.gif, plus.gif, minus.gif,
and clearpix... more >>
End-of-line Handling in the XmlReader (.NET Framework Version 1.1)
Posted by Matthew Heironimus at 6/21/2004 11:41:10 AM
According to the XML 1.0 (Third Edition) W3C Recommendation =
(http://www.w3.org/TR/2004/REC-xml-20040204/#sec-line-ends) all #xD, =
#xA, and #xD#xA character combinations should be converted to a single =
#xA character.
According to the "Reading XML with the XmlReader" section of the ".NET =
... more >>
xsl question
Posted by Bernie V at 6/19/2004 9:21:53 AM
Hi group,
I use this xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<table class="TekstChart" border="1">
<tr>
<th bgcolor="#f5deb3" align="left">Plaat... more >>
XmlValidatingReader and XmlResolver problems
Posted by google NO[at]SPAM bitfurnace.com at 6/19/2004 2:35:05 AM
Hi, I need some help...
Im trying to use XmlValidatingParser with a custom XmlResolver. Im
finding, however, that the custom resolver never gets called, and that
the XmlValidatingParser acts as a non-validating parser
I created a custom resolver called XmlBreakingResolver, whos GetEntity
an... more >>
XmlDocument --> XPathDocument - How
Posted by Ed S at 6/18/2004 2:45:40 PM
Hi All,
I'd like to convert from an XmlDocument to an XPathDocument (without
saving the XmlDocument down to a file - this is a web app). I can't see
any way to do this.
Any help is appreciated.
--Ed... more >>
xsd.exe errors with schemas importing other schemas
Posted by Mike at 6/18/2004 11:19:10 AM
Hi,
I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references another schema and the XSD.exe is having trouble finding the referenced schema. Does anyone have an example of what the command line params would be ... more >>
XSL not working as expected....
Posted by Marc Scheuner [MVP ADSI] at 6/18/2004 8:21:53 AM
Folks,
I'm trying to get something done in XSL and either I'm just missing
some silly thing, or it's not possible to do it.... which is it???
What I'm trying to do is have a XML document that (to some degree)
describes a report - basically, it's a collection of labels and XPath
references o... more >>
Receiving XML Documents
Posted by elguapois NO[at]SPAM yahoo.com at 6/18/2004 7:04:31 AM
Hi,
I'm setting up a service that receives a XML document, validates the
document using a schema and then returns a simple result.
I wanted to ask what the best way is of doing this, that is sending
the xml document. So far I've come across 2 way's:
1. Create a webservice that accepts a ... more >>
Flat File To XML Roundtrip
Posted by gowens NO[at]SPAM nixonpeabody.com at 6/18/2004 6:32:56 AM
OK I'm on a steep learning curve with XML et.al. and need some advice.
I'm writing a B2B front door for a new application. I have multiple
data suppliers all sending various formats of flat files. Most of the
inbound files are CSV (but a couple are tab-delimitted and one is an
Excel spreadshee... more >>
Null elements don't appear in XMLTextWriter results
Posted by AFN at 6/18/2004 1:00:45 AM
I am running the code below to generate XML from a data table. But some
fields in the data table are Null for every record. Suppose field5 has a
null database value. I would expect to see:
<field5></field5> or <field5 />
but instead it doesn't even show the field at all for those r... more >>
Problem with Schema Validations using XmlValidatingReade--HELP
Posted by Rajesh Jain at 6/17/2004 9:04:01 PM
I Have 2 separate schemas.
--------------Schema 1 is defined as below-----------
<xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Loan">
<x... more >>
XML serialization of private fields?
Posted by Todd at 6/17/2004 6:31:01 PM
I've seen others with this same dilema but no solutions. Is there a way to serialize an object containing private fields? What about private fields containing complex data structures such as custom collections of custom objects with private fields?
IXmlSerializable?
ISerializable?... more >>
what would the XPATH look like for the node below
Posted by KB at 6/17/2004 5:34:14 PM
Hello,
Everytime I try to get the xmlnode for the document fragment below
system returns nothing...
What would the xpath be for node <Confirmation> ?
Thanks you
KB
code:
Dim xmlnsManager As New System.Xml.XmlNamespaceManager(xmldoc.NameTable)
xmlnsManager.AddNamespace("... more >>
|