all groups > dotnet xml > november 2004
Filter by week: 1 2 3 4 5
xsd pattern needed
Posted by ray NO[at]SPAM cape.com at 11/30/2004 7:28:09 PM
i need to create a pattern for an string field in my xsd. the field
may or may not have a value if it has a value it should be an integer.
I have tried nillable and that didn't work. I'm writting this in c#
using XmlValidatingReader.
Thanks for your help
Ray... more >>
SelectSingleNode with multiple namespaces (sort of)...
Posted by 455 at 11/30/2004 6:21:43 PM
Hello all,
I've been trying to figure this out for hours now... can anyone help?
I have an XML document like this:
<?xml version="1.0" encoding="utf-8" ?>
<ICE:ServiceCall xmlns="ICE" xmlns:ICE="http://www.ice.net">
<ICE:Service name="">
<ICE:RetVal/>
<ICE:ConnString/>
<ICE:Para... more >>
Read XML from a scoket
Posted by Drago Velchev at 11/30/2004 5:57:05 PM
Hi,
I have a socket connection where messages are formatted as XML, i.e. each
message is in the form <msg>..</msg>.
Is there an easy way to get a XMLDocument for each message form the socket
stream?
I tried with XMLTextReader and the NetworkStream of the socket but the
reader blocks until the ... more >>
Is Visual Studio a bad validator?
Posted by Wole Ogunremi at 11/30/2004 1:37:06 AM
Can anyone please explain why VS.NET 2003 XML IDE sometimes has problems
validating documents against a schema but the same document/schema validates
fine when run against system.xml.xmlvalidatingreader. Is this a documented
bug? I could not find much on google.
In the future I'll validate at... more >>
xml -> xml using xslt
Posted by Chris at 11/29/2004 4:42:08 PM
Hi,
I have an XML-file :
<book>
<title>Alaska</title>
</book>
I would like transfer the <book>-elements to <bookname> using an xsl-sheet,
thus producing xml-again. and saving the output in a new xml-file
how can I achieve this ? I don't know how to setup my select-statements
(????)... more >>
HELP! XSLTranform and XMLTextWriter Error
Posted by devanoy NO[at]SPAM hotmail.com at 11/29/2004 3:27:27 PM
I have tried everything with this!
I get an error stating "Index was outside the bounds of the array"
My code looks like this....
xmlDoc = New XmlDocument()
xmlDoc.Load("xml.doc")
xslDoc = New XslTransform()
xslDoc.Load("xsl.doc")
Dim TWrtr As... more >>
Performance of XmlDocument.ImportNode
Posted by Andrew Jacobs at 11/29/2004 11:29:09 AM
I am using C# to write an application that migrates documents from one
version of an XML schema/DTD to later one. Much of the document has the same
structure in the two versions and I use XMLDocument.ImportNode to copy
unchanged sub-trees between the old and new document but this takes much
... more >>
XmlTextReader with Stream
Posted by CLL at 11/29/2004 6:37:05 AM
Sorry about creating a new post, but my old one is 3 pages down and the older
posts don't seem to get answered very often. (original post at the bottom)
I called PSS about the QFE fix and gave them the number provided below and
they told me I need an article number because QFE 1641 fixes many... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Set Attribute Fail
Posted by Kevin Tang at 11/29/2004 2:13:02 AM
Dear all,
I am using MS XML Parser 3.0, I want to know what will cause the
"setAttribute" fail in IXMLDOMElement ??
My program is:
extern CComQIPtr<IXMLDOMElement> elem;
ASSERT(elem); // this is a valid element.
HRESULT hr = elem->setAttribute(name, value); // why it return S_FAIL ???... more >>
XMLTextWriter problem / Newbie
Posted by CyberCo at 11/28/2004 7:56:46 PM
I have zipped my sollution with the problem
http://uploads.savefile.com/users/uploads/invoice.zip
I'm trying to split XMLTextWriter code in three subs but I always get an
error.
This is the example from the book I'm learning now.
Please, download this sollution and, if you know, let me know... more >>
XmlTextreader versus DOM
Posted by Chris at 11/28/2004 5:43:54 PM
Hi,
the docs say :
"The Xml-document is not loaded into memory when using XmlTextReader, as
opposed to using the DOM where the entire document is loaded in memory"
but, when using XmlTextReader, how can I parse then if the document is not
loaded ?
something must be loaded no ?
thanks
... more >>
xhtml in xml element
Posted by Wole Ogunremi at 11/28/2004 3:16:04 AM
I guess this is a well asked question but it is tripping me up!
I'm putting a forum together allowing xhtml markup content. I am validating
against a schema but getting "Could not find schema information for element
<elementName>...
I would appreciate if anyone could advice where I am goin... more >>
XmlDocument and DataBinding
Posted by pete at 11/26/2004 5:59:20 PM
Hi there,
Can someone explain to me why I can't bind to an XmlDocument but I can bind
to an XmlNodeList. It's my understanding that they both implement the
IEnumerable interface which is required for databinding. Am happy to work
with the XmlNodeList but I can't shake the feeling I'm missing s... more >>
Re: Have idl and sdl - need wsdl....
Posted by Christoph Schittko [MVP] at 11/26/2004 5:13:34 PM
Here's the link to WS-CF:
http://www.thinktecture.com/Resources/Software/WSContractFirst/default.h
tml
Christoph Schittko
MS MVP XML
http://weblogs.asp.net/cschittko
> -----Original Message-----
> From: Christoph Schittko [mailto:christoph@bracketangles.net]
> Posted At: Friday, Nove... more >>
Read RDF ?
Posted by Vishal at 11/26/2004 2:30:22 PM
Hello,
I can easily read an RSS sheet, but I am not able able
to read a RDF sheet. Each time I try to read it returns me
0 nodes. Here is how I try it.
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs)
ReadRDF("http://www.xsltblog.com/index.rdf")
... more >>
Have idl and sdl - need wsdl....
Posted by viotti NO[at]SPAM hotmail.com at 11/26/2004 7:14:34 AM
I'm making one of my first web services (with C#) and need help
getting started.
I have received an idl file and a sdl file that describes the
interface I need to implement... but how do I generate anything from
these files? It seems like I have to convert one of the files to a
wsdl file and th... more >>
substitutionGroup and extension problem
Posted by google NO[at]SPAM vandevuurst.com at 11/26/2004 2:18:15 AM
Hi,
I'm working on an xml schema and I'm running into some problems
relating substitutionGroups and extensions.
This xsd validates fine:
There are three elements and three complex types and every element has
the type of some complexType.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema... more >>
xml serialization
Posted by Ice at 11/25/2004 11:07:43 PM
All -
I'm pretty comfortable with simple XML serialization of objects. However I
observed something the other day and I wanted to know if I solved it the
right way.
Basically if I have a string which contains a single xml node, I can
serialize with this line of code:
object = (object)se... more >>
Serializing instances of derived classes
Posted by Aleksei Guzev at 11/25/2004 3:12:56 PM
Imagine one writing a class library CL1 for data storage.
He defines classes ‘DataItem’ and ‘DataRecord’ so that the latter contains
a collection of the former.
And he derives class ‘IntItem’ from ‘DataItem’
[XmlRoot ("DataItem")]
[XmlInclude (typeof (IntItem))]
public class DataItem
{
... more >>
SORTING A FILE XML
Posted by Siu at 11/25/2004 7:05:07 AM
Hi,
is it possible to sort a XML file without using a XSLT or XSL file??
For example, my XML is:
<A>
<1>
<3>
<4>
<2>
</A>
<C>
<2>
<1>
</C>
<B>
<3>
<2>
<1>
</B>
The result of the sorting method should by:
<A>
<1>
<2>
<3>
<4>... more >>
performance of system.xml vs msxml4.0
Posted by jiglu_desai NO[at]SPAM yahoo.com at 11/25/2004 5:54:31 AM
I have an xsl file to generate xml in to an html file. The size of
the xsl is 300kb and size of the xml is 47 kb (the size of xml is
variable).
I am using VB.net to convert the xml file into an html file. The
vb.net module peforms following task:
load the xml file in XMLDocument object ( I... more >>
XmlTextWriter and QuoteChar ???
Posted by Chris at 11/24/2004 7:37:54 PM
Hi,
I'm trying to specify single-quotes to be used in xmlAttributes as follows :
XmlTextWriter writer = new XmlTextWriter (filename, null);
writer.QuoteChar = (char)39;
--> but he still generates double quotes ???
thnx for your help
Chris
... more >>
purpose of XmlConvert.ToString() ???
Posted by Chris at 11/24/2004 7:35:48 PM
HI,
what is the purpose of XmlConvert.ToString() ?
why not just use Convert.ToString() ?
e.g.
Int32 vInt32 = -2147483648;
string s1 = XmlConvert.ToString(vInt32);
string s2 = Convert.ToString(vInt32);
s1 and s2 result in the same string.
so what is the added benefit ?
... more >>
Swap pointers?
Posted by Lidström at 11/24/2004 4:50:41 PM
Hi,
is there a method somewhere in the framework for swapping two pointers?
--
Daniel
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?... more >>
Can XML do this?
Posted by Just Me at 11/24/2004 4:45:11 PM
I know nothing about XML and am asking this so I know if I should spend some
time learning.
I had a VB6 address book app that I converted to .net
It reads and writes records in a random file.
That is, each record is the same size, (composed of items that are fixed
size strings.)
If no midd... more >>
Cleanest way to change order of serialized el's?
Posted by Lidström at 11/24/2004 10:52:33 AM
Hi,
I would like to know the cleanest way to change the serialization of my
Line class from:
<Line staStart="2327.02" length="10.00000003390744">
<End>549016.570965 57945.741122</End>
<Start>549019.590988 57955.274194</Start>
</Line>
to
<Li... more >>
Access Denied when trying to write to file via Web Service
Posted by SQLScott at 11/24/2004 9:23:04 AM
Forgive me if this seems trivial but I cannot seem to find an answer. For
testing purposes, one of my methods in my Web Service writes to a file (at
least tries). I am using the following line of code to create the text file:
Dim sw As StreamWriter = New StreamWriter("c:\Accesstimes.txt")
... more >>
XPath and Serialization
Posted by myspammail NO[at]SPAM blueyonder.co.uk at 11/24/2004 3:07:50 AM
Hi,
I am reading values from an Xml file using XPathDocument /
NodeIterators etc.
My question is, is it possible to retrieve the XML for a node as a
string so that i can use XML Serialization to instantiate an object
from the XML Fragment returned WITHOUT using XmlDocument which loads
the ... more >>
XmlSchema: get basic type of XmlSchemaAttribute?
Posted by Gary McGill at 11/24/2004 1:00:19 AM
I'm finding the XmlSchema object model very hard to follow :-(
I've figured out by trial and error how to do most things I need,
but this one has me beat.
Suppose my schema has a simple type defined as follows:
<xs:simpleType name="abc">
<xs:restriction base="xs:string">
<xs:... more >>
xslt stylesheets as assembly resources?
Posted by arvee at 11/23/2004 6:39:01 PM
I like the idea of doing transforms on XML data via stylesheet, but I don't
like having to manage lots of .xslt files.
Is there a standardized approach to storing xslt strings in a .net
application?
... more >>
XML formatting question
Posted by Jason Hurder at 11/23/2004 11:04:23 AM
Hello all,
After I've constructed an XmlDocument object composed of XmlNodes, I
send the actual InnerXml contents to a server where my XML is processed.
However, elements that have no InnerText end up looking like this:
<PartMessage MessageText="INVENTORY REQUEST" MessageKeyword="REASON" /... more >>
SelectSingleNode not finding nodes
Posted by spam NO[at]SPAM bienvenu.net at 11/23/2004 10:46:29 AM
I have the following Visual Basic .NET code in an ASP.NET project:
' ...
Dim xdStructure As XmlDocument
Dim xnStructureRoot As XmlNode
xdStructure = New XmlDocument
xdStructure.Load(Server.MapPath("~/xml/Structure.xml"))
xnStructureRoot = xdStruc... more >>
XslTransform in msword application with images
Posted by Guillaume Durand at 11/23/2004 5:49:16 AM
Hi,
I transform XML data in an OutputStream which is open as a word document.
All works fine excepted the images defined in the xsl file which are html
links (src="images/image1.jpg").
So, when I save the word document in a particular place, the image can't be
displayed cause the path is ... more >>
XmlDocument and XmlNode
Posted by Siu at 11/23/2004 4:43:02 AM
Hi,
I've loaded an XmlDocument from a file XML: this file has many similar
XmlNode and it is difficult to select them by using SelectSingleNode of the
object XmlDocument.
I've this question: is it possible to identify each XmlNode of the
XmlDocument by using an inner key or something like ... more >>
Validating Xml with DTD and XmlValidatingReader
Posted by Brecht Yperman at 11/23/2004 2:03:04 AM
Hi,
I'm reading in an xml-file that has to be validated by it's dtd (code below).
This works fine, except from some weird behaviour.
<!ELEMENT STRUCT (FIELD+)>
<!ATTLIST STRUCT
sname CDATA #REQUIRED
ref CDATA #REQUIRED
>
This does what we expect (both sname and ref are required), but... more >>
SelectSingleNode question
Posted by TheNortonZ at 11/22/2004 10:47:53 PM
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C4D0E5.4D4014F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am somewhat new to extracting data from an XML document in .Net.
My document looks like this:
<?xml ve... more >>
posting XML
Posted by BK Kim at 11/22/2004 5:15:21 PM
I am developing two asp.net web projects.
When the last page of the first project is done, it redirects to the first
page of the second project.
However, I need to transfer some data to the second project and I want to
use xml data for this not query strings.
Anyone know how to achieve th... more >>
vs.net xml parser
Posted by apz at 11/22/2004 3:11:33 PM
hi
anyone know of a C++ (ansi) XML parser which uses Visual Studio .Net 2003
compiler??
... more >>
Validating XML Against a XSD Schema
Posted by Shailendra Batham at 11/22/2004 3:06:44 PM
This is a multi-part message in MIME format.
------=_NextPart_000_0033_01C4D0A4.E17FCE80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hi guys
I need your suggestions / opinion for doing this the right way.
I have a XML and a Schema for the ... more >>
XML schema
Posted by godfader at 11/22/2004 1:49:13 PM
I have a dtd file . I want that file transformed into schema .I found
program dtd2xsd.pl but it only prints on standard output.
Has anyone worked with that program and how to set some parameters so it can
print into some file?
mario410sPaM@yahoo.com
remove spam from mail
... more >>
Omit BOM in XMLDocument.save
Posted by Scot at 11/21/2004 11:55:03 PM
How do I get the following code to not put the Unicode BOM in the file. If
the attribute ecoding=UTF-8 exists, it will put the BOM in the file.
objXMLDocument = New XmlDocument
objXMLDocument.Load("C:\test.xml")
'change the xml file
objXM... more >>
special chars
Posted by Paul at 11/21/2004 11:29:01 PM
Hi,
I want to create xml in the following format:
....
<driver venid="VEN_1002&DEV_4C66&SUBSYS_011D1028" />
<driver venid="VEN_1003&DEV_4C67&SUBSYS_011D1029" />
<driver venid="VEN_1004&DEV_4C68&SUBSYS_011D1030" />
....
However, I am not able to load it in C#. I am not able to view it in IE... more >>
XML DTD Question
Posted by Jay at 11/21/2004 12:27:46 PM
Here is my original xml structure. I want to add another child node called
hyperlinks to the parent graphic. How would I modify this DTD to reflect
this new child being added.
Thank You for any help toward this end!
<graphics>
<graphic>
<tag>
<parameter/>
... more >>
XPath trouble - Help!
Posted by Kirsplat at 11/21/2004 12:26:49 PM
Any leads/help/ideas are greatly appreciated. I'm getting a response back
from a SOAP server and under classic ASP I was able to process the xml fine.
The app is being ported to c# and the same approach isn't working as well.
It fails at the xpath query after the results come back.
XML respo... more >>
Replacing SQL with XML
Posted by TheNortonZ at 11/21/2004 7:07:16 AM
We are using MSDE 2000 and ADO.Net for our database/datalayer in our client
server based app.
The application is not expected to have more than one user because the whole
thing is installed on a users machine.
The problem with MSDE is that if you have to install it, its like a 70MB
insta... more >>
WriteXML encoding strings ! Please help
Posted by junk NO[at]SPAM spirit.co.za at 11/20/2004 12:32:05 AM
Hi Guru's,
Going crazy with this problem!
I fill a dataset in asp.net with a 'FOR XML AUTO' query and Output it
back to the browser.
> DS.WriteXml(Response.OutputStream, XmlWriteMode.IgnoreSchema)
No matter what I do I get the first nodes "<" encoded as "<" This
means that the scrip... more >>
why I can serialize a class without using [Serializable]?
Posted by ALI-R at 11/19/2004 2:37:52 PM
I have written a class in C# and I have serilized into a file .I read
somewhere that if you want a class to be serializble you must add an
attribute called [Serializable] before the class and within the namespace,I
didn't do that but I could serialize it using the following code:
try
{
Xml... more >>
XML file vs Windows Registry
Posted by fernandez.dan NO[at]SPAM gmail.com at 11/19/2004 11:37:14 AM
Hi
I just have a quick question. One of our Windows based application
uses the registry for configuration type options and some other
things. I want to modify our application to move to use a XML file
instead of the registry. The other engineer argues that it is faster
and easier to manipula... more >>
array to xml
Posted by ALI-R at 11/18/2004 4:49:46 PM
have tree variable with their values:
1) rptName="report1"
2) rptPath="c:\......"
3) serverPath=http://server...
and
4)an arry which contain Name/value pairs.
what is the best way of wrting them into an xml file(C#)??
these Xml files are stored in the same directory so I also give the XM... more >>
XmlTextReader with Stream
Posted by CLL at 11/18/2004 11:15:03 AM
All,
I have been following this thread for some time now. Recently I found that
in 2 seperate posts, the MSFT employees responded as there was a QFE to fix
this problem. All you need to do is contact PSS.
I was like great, so I contacted them. Then they asked for a kb article
number (... more >>
|