all groups > dotnet xml > december 2004
Filter by week: 1 2 3 4 5
Read xml file with multiple elements
Posted by Mark at 12/31/2004 10:46:35 AM
I have the following xml file that I want to read in using vb.net 2003:
<dordivision name="district 1" propname="District 1">
<printer id="location11" duplex="false">Location 11</printer>
<printer id="location12" duplex="true">Location 12</printer>
<printer id="location13" du... more >>
Xml Schema validations and namespaces...
Posted by Dan Bass at 12/31/2004 9:37:39 AM
There's an XML message I have, that has no namespace information.
Then there is a XSD schema that is must validate against, but this has a
targetNamespace and xmlns of "http://www.wbf.org/xml/b2mml-v02".
How do I get this XML to validate against the Schema in C#?
If I use XmlSpy (2005 home ... more >>
From xsd schema to xml instance (template) from code
Posted by ehigionni NO[at]SPAM katamail.com at 12/31/2004 5:45:32 AM
Hello everyone,
I have to create an xml instance (a template with samples data)
from a given xsd. I'd like to be able to this from code and not from a
tool. Is there any available API that give me less to work? ;-)
Thanks in advance and Happy New Year,
Gionni... more >>
How to pass a Nodeset to an XPath extension function?
Posted by Damien Goutte-Gattat at 12/31/2004 1:19:06 AM
I am using the .NET framework v2.0.40607 with Visual C# Express and I would
like to create some custom XPath functions to use directly in a XSLT
stylesheet.
I called System.Xml.Query.XmlArgumentList.AddExtensionObject(string, object)
to register the functions I've written.
The functions ... more >>
"element is not declared" errors when validating xml from schema
Posted by mailing NO[at]SPAM sunnybrisbane.com at 12/30/2004 7:01:13 PM
I am writing a web application for job seekers, and am adding a
section that allows administrators to upload jobs to the system via
xml. I have used an xml schema to validate the xml they upload. The
website runs on IIS5 using classic ASP, and the xml validation is done
in a .NET component writt... more >>
ensuring html is valid before storing it
Posted by Peter Hardy at 12/30/2004 6:28:14 PM
Hi guys,
Sorry for the cross-post but I got no response in the asp.net newsgroup.
I am trying to develop a mini e-learning application where the user provides
content for each page. Eventually, I'd like to shift to using templates but
at the moment the users is just entering content using ht... more >>
Namespace references in XML Serialization
Posted by MattBell at 12/29/2004 9:29:03 AM
I have an object which serializes to XML. It's root node references the
namespace I'm working with, but I would like to preferace the root node with
a namespace reference (ie ns1:RootNode) is there a way to do this with
XmlAttributes?
... more >>
Namespace references in Xml Serialization
Posted by MattBell at 12/29/2004 9:23:01 AM
I have a root node attribute which contains a name space declaration. I'd
like to put a reference onto the front of it (ie: ns1:RootNode) where ns1 is
defined as the namespace I'm using. Is there a way to do this in C#?
Also can I include other namespaces in this declaration as well?... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How do I escape single tick marks in XPath Queries?
Posted by Greg at 12/29/2004 9:00:15 AM
I keep getting an error when I have a tick mark in a text value that I am
searching for in my XPath Query.
Example:
<Authors>
<Author LastName="O'Donnel">
<Author LastName="Smith">
</Authors>
If I try to do a SelectNodes(Authors/Author[@LastName='O'Donnel']) I get an
exception "... more >>
xsd:enumeration inheritance fails
Posted by aevans1108 NO[at]SPAM yahoo.com at 12/28/2004 9:36:42 PM
Greetings
I can't seem to inherit enumerated values from a globally defined type
in my XML schema. XmlSchema.Compile() doesn't like it.
Here's the schema.
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<x... more >>
Xsd question
Posted by Robert Strickland at 12/28/2004 5:10:43 PM
I developed a schema that uses the following for schema settings:
elementFormDefault="qualified"
xmlns:at=http://www.mycompany.com
targetNamespace="http://www.mycompany.com"
The goal is to namespace the my elements with "at" - example is
at:myElementName.
I use xsd to build a class. I t... more >>
XPath problem
Posted by gonzalez at 12/28/2004 4:32:34 PM
Hi all,
How come the following XPath expression doesn't return any nodes?
descendant::*[node()=SignerInfo]
Here's how it's called on the document root node:
XmlNodeList list = m_xmlDoc.DocumentElement.SelectNodes(sXPathExpression);
Here's the XML:
<?xml version="1.0" encoding="utf-8"... more >>
XML File Size & Memory
Posted by Roshawn Dawson at 12/28/2004 1:45:53 PM
Hi All,
I have an xml file that is 63mb in size. If I were to load this file
into memory, will it consume 63mb of memory or will it consume more than
that?
Thanks,
Roshawn... more >>
question about xml serilization
Posted by amethyste at 12/28/2004 5:15:31 AM
hello,
This is my sample (simplified):
public class Binom
{
[XmlAttribute("range")]
public string _Value;
[XmlAttribute("name")]
public string Label;
}
public class Property
{
[XmlAttribute("name")]
public string propertyName;
public Binom DefaultAttribute;
}
Prop... more >>
XmlValidatingReader throws an exception
Posted by Rahul Apte at 12/28/2004 4:49:39 AM
I am planning to test WSDL fine for a web service as follows:
1. Get a WSDL file from the web service.
2. Validate the WSDL file against the XML schema.
The problem I am facing is with the schema file. I reffered to
<http://www.w3.org/TR/xmlschema-1/> - http://www.w3.org/TR/xmlschema-1/" ... more >>
validate against xsd
Posted by CK at 12/28/2004 1:31:25 AM
I am doing a
Doc.Loadxml(myxml)
and I have an xsd schema that I want to validate the myxml against. How can
I do this. code would help.
Thanks in advance.
... more >>
Querying Very Large XML
Posted by Greg at 12/27/2004 2:48:53 PM
I am working on a project that will have about 500,000 records in an XML
document. This document will need to be queried with XPath, and records
will need to be updated. I was thinking about splitting up the XML into
several XML documents (perhaps 50,000 per document) to be more efficient but
t... more >>
XmlTextWriter & Socket
Posted by K Rege at 12/26/2004 4:42:58 PM
Hi there,
I tried to implement a little XML-EchoServer using Sockets and
XmlTextWriter/Reader. However the server hangs while reading the input from
the client (wr.Flush() seams not to work). I could make it run by using
s.Send(new byte[10000]); instead of flush, but this cannot be the solutio... more >>
Is there a way to have the style sheet included in the sqame file as the XML data
Posted by RD at 12/26/2004 11:32:21 AM
My app transmits XML data file via e-mail and for now I attach both the XML
data file and the corresponding style sheet. I found however that whenthe
recipient double clicks on the XML file to read it, he/she can't open it
that way. For some reason that escapes me, the XSL fil can't be found,
al... more >>
XML & Schema editor
Posted by Smugsboy at 12/26/2004 6:17:32 AM
Hi,
I would like to know whether VS.NET can edit XML document and
intellisense information from the schema the XML document is based upon
?
If not then are there any other editors or VS plugins that can do the
trick ?
... more >>
equivalent code?
Posted by haiQ at 12/25/2004 8:59:01 PM
I'm a new at C# - so please forgive my ignorance. The following 2 snippets
of code seem to be fairly equivalent. Is there any advantage to using 1 over
the other? Example 2 seems to be much more efficient...
Example 1:
XmlTextReader xtr = new
XmlTextReader(HttpContext.Current.Server.Map... more >>
HTML Table with Dynamic Columns
Posted by Fresh_Air_Rider NO[at]SPAM Hotmail.com at 12/25/2004 2:01:18 PM
Hello
Does anyone know how to display data from a data source such as an
array or SqlDataReader or XML etc within an HTML table whose number of
columns can change according to the value of a variable ?
This is one thing that XSL is brilliant at but I can't find a nice
..Net solution
The ... more >>
Encoding question
Posted by RD at 12/24/2004 1:06:42 PM
What encoding must I use in my XML file to show the french character set
correctly in the browser?
I'm extracing data from a SQl server 2000 table and placing it in XML files
using the dataset.writeXML command. That part of it works fine, but when the
data in te XML file contains french charac... more >>
how to get absolute XPath
Posted by gonzalez at 12/24/2004 10:10:29 AM
Hi,
I'm trying to get the absolute xpath to a node in DOM (XmlDocument). I know
I can build it by warlking the tree recursively, but I'm wondering if there
is an API in DOM or in XPathNavigator that allows me to get the absolute
path for a given node?
Thanks,
--Ader.
... more >>
How do I write a response to a request from an xml data island?
Posted by Nicole Schenk at 12/23/2004 8:03:04 PM
I need to know the code I must write to respond xml to a data island as a
result from a src request from the data island.
Thanks so much... more >>
Ampersand in value gives me a pain
Posted by RD at 12/23/2004 5:18:24 PM
Some of the customers in the table I'm trying to see in an XML doc have an
ampersand in the data. Looking at them and formatting the XML doc with a
style sheet this generates an error. I'm creating the XML doc with VB.Net
code, simply writing extracted values from my database to the XML doc. What... more >>
Style sheet gives me an error
Posted by RD at 12/23/2004 5:01:18 PM
The data comes out Ok in columns but at bottom of page I get the following
message
The following tags were not closed: CONAME,CONAME. Error processing resource
'file:///C:/ProjetsVbNet/RMT/Sg...
The code below follows step by step a sample supplied by MS. Can anyone tell
me what to do not to ... more >>
Non-Deterministic Schemas
Posted by rox.scott at 12/23/2004 1:49:05 PM
The following article says the .NET SOM will not allow what it calls
"non-deterministic" schemas:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconnon-deterministicschema.asp
** Is this a bug in the SOM or in the schema ? **
Is it something that will be reso... more >>
parsing xml document
Posted by Jack Colletta at 12/23/2004 10:31:04 AM
I have the following xml file (given to me not created by me)
<?xml version="1.0"?>
<workOrderReleased
xmlns="http://www.qad.com/qdoc"
xmlns:enc="http://www.w3.org/2002/12/soap-encoding"
xmlns:qcom="http://www.qad.com/qdoc/common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance... more >>
Accessing Global Parameters from the included stylesheet.
Posted by Eshrath Khan at 12/23/2004 2:02:08 AM
Hi all,
I have a .Net program which access transforms a XML using an XSL
stylesheet. The .net program calls Stylesheet main.xsl file.
The main.xls contains only <xsl:include> elements to include other XSL
files.
like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/X... more >>
Performance of System.Xml.Xsl.XslTransform
Posted by Paja via .NET 247 at 12/22/2004 4:06:51 PM
Hi all,
I have problem with the %subj%. I need to convert XML to HTML using XSL transformation.
Current vbcode
Dim xslTransformer As Xml.Xsl.XslTransform = New Xml.Xsl.XslTransform
xslTransformer.Load(stylePath)
xslTransformer.Transform(sourceFile, outFile)
When processing a bigger file (... more >>
Xml Serializing subclass problem
Posted by Angelos Karantzalis at 12/22/2004 4:00:19 PM
Hi guys. I've come across a problem when I tried to serialize a class into
xml, only to discover that the parent class's XML Serialization properties
weren't included in the output xml.
Actually, the class I'm serializing is two steps down in the inheritance
ladder. It's got a parent class whi... more >>
Re: Re: api to check wheter xml is well formed
Posted by Anonymous at 12/22/2004 2:25:02 PM
You mean XmlTextReader
Ashish wrote:
> Are there any functions in .Net which can be used to verify whether xml is
> well formed?
That's quite unusual requirement. Usually, when XML is built using XML
API such as XmlTextWriter you don't need to check if it's well-formed -
you can trust... more >>
api to check wheter xml is well formed
Posted by Ashish at 12/22/2004 1:45:46 PM
Hi
Are there any functions in .Net which can be used to verify whether xml is
well formed?
Thanks,
Ashish
... more >>
Convert.ToString( double ) + xsd:pattern + RegEx == ?
Posted by aevans1108 NO[at]SPAM yahoo.com at 12/22/2004 10:59:42 AM
expanding this message to microsoft.public.dotnet.xml
Greetings
Please direct me to the right group if this is an inappropriate place
to post this question. Thanks.
I want to format a numeric value according to an arbitrary regular
expression.
Background:
I have an XML schema that I... more >>
Determining Specified Elements After Deserialization
Posted by Jay at 12/22/2004 8:48:21 AM
Hello all. When using the XmlSerializer, you can create a
property/field that tells the serializer whether or not to bother
putting an element in the document. For example:
// C# example.
public class MyClass {
[XmlIgnore]
public bool MyPropSpecified;
public int MyProp;
}
If MyPropSpe... more >>
Generate XML File from XSD schema
Posted by celine_rimeur NO[at]SPAM yahoo.fr at 12/22/2004 1:17:06 AM
Hi all,
I am trying to build a XML file with the help of the XSD file with VB.NET.
Does someone has any tips on how to do this?
Thanks a million.
Céline... more >>
Deserialization issue
Posted by Mike Sarbu at 12/21/2004 10:58:35 PM
Hello all,
I have an XML file like this:
<?xml version="1.0" encoding="utf-8"?>
<SomeObject xmlns="http://www.abcinc.com/objectdefinition"
xmlns:someobj=http://www.abcinc.com/objectdefinition>
......
</SomeObject>
And I want to deserialize it, so I created a class:
[XmlRoot(Namespac... more >>
Basix question on a string, (I beleive)
Posted by Paolo Pignatelli at 12/21/2004 3:57:10 PM
I have the following XML file:
--------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="sample2.xslt"?>
<Employees>
<Employee>
<Name>Lieder</Name>
<Age>4</Age>
<Greeting>Awooo!</Greeting>
</Employee>
<Employee>
<Name>Lieder2</Nam... more >>
XSLT example does not work?
Posted by Paolo Pignatelli at 12/20/2004 10:18:17 AM
I am trying to work the example on
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q315888 .
I follow esxactly the advice (I beleive):
Here are the files:
WebForm1.aspx:
--
....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title... more >>
Merge data
Posted by John Smith at 12/19/2004 11:26:39 PM
..Net 2003 C#
I get xml from a sql database pull.
I put the data into a XMLDomDocument and then the user changes it.
I now need to update the database correctly. I need to be able to get the
data back correctly including add, change and delete to the original data.
When I pull the data from ... more >>
Global namespace URI replacement
Posted by Chris Bray at 12/18/2004 10:41:51 AM
Hello all,
I am trying to globally replace all namespace URIs in an XML document.
I have tried using XmlNamespaceManager to do this, but have not had any
success. I don't want to do a simple string replacement on the
original text, as the URI may be referenced in a text node, which I
would n... more >>
windows service help
Posted by CK at 12/18/2004 7:43:37 AM
I need a windows service that listens to a directory , if any xml file is
placed in the directory it reads it and calls a class and receives a
string.. this is the code I came up with. it works but it kills my processor
after a few min. what should i do??
Thanks
private void button6_Clic... more >>
Changing format of XML Doc (using WriteXML?)
Posted by Paolo Pignatelli at 12/17/2004 8:15:08 AM
I am trying to get an output/file like this (below) in an XML file
(MyXmlFile.xml) (which I will use for a slide show)
--
<gallery timer="3" order="sequential" fadetime="2" looping="yes" xpos="0"
ypos="0">
<image path="images2/Test1.jpg" />
<image path="images2/Test2.jpg" />
<imag... more >>
Adding the "xls:" to an element?
Posted by schneider at 12/17/2004 2:58:17 AM
How do I add the "xls:" to a XmlNode?
I tried XmlDoc.CreateElement("xls: Value-of")
I'm trying to create an element like the following:
<xls: value-of select="SomeName" />
Thanks,
Schneider
... more >>
XmlDocument.DocumentElement is null?
Posted by schneider at 12/16/2004 8:05:42 PM
The DocumentElement is always null? and is readonly?
How to I add node items to the root?
I'm try to create a document from nothing.
All the samples start by loading a string or file.
Thanks,
Schneider
... more >>
xml generator
Posted by ALI-R at 12/16/2004 3:03:37 PM
Hi All,
I have an xml file with the structure below.I'd like to create dynamic
number of xml files from this file based on <subreport> elements.each XML
file contains
subreport element only .for instance if there are 4 <subreport> elements
,I'd like to create 4 different xml files and I want ... more >>
Xml validation against xsd
Posted by Sangeeta at 12/16/2004 12:25:01 PM
I have a xml documnet to be validated against an xsd. The xsd is specified in
the doc as
<books xmlns="my-bookshelf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:SchemaLocation="my-bookshelf books.xsd">
<book publisher="QUE">
<title>XML By Example</title>
<author>Be... more >>
SelectNodes() having trouble...
Posted by Adrian Parker at 12/16/2004 8:42:41 AM
I have the following xml doc...
<?xml version="1.0"?>
<GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
<Body>
<StatusReport>
<StatusRecord>
<CorrelationID>E1308AB43036D8B8FCD2CBB1EE7FFA6B</CorrelationID>
</StatusRecord>
... more >>
DTD translation to Schema
Posted by YorgZero at 12/16/2004 7:02:39 AM
Hello,
I need to write a DTD to XML Schema translator in C#. Is there some source
code available I can start from? It does not have to be C#, it can be C, C++
or Java.
Thanks
Yorg
... more >>
|