all groups > dotnet xml > january 2006
Filter by week: 1 2 3 4 5
how to Merge to xml document ?
Posted by # Cyrille37 # at 1/31/2006 9:47:22 PM
Hello,
I've to merge a peace of xml in another xml document.
Here is an example:
The doc:
<layout>
<win x="0">
<visible>false</visible>
<text>coucou</text>
</win>
</layout>
The other xml peace :
<layout>
<win x="10">
<visible>true</visible>
<backcolor rgb="25,25... more >>
How to change attributes in an xml-file
Posted by Philipp at 1/31/2006 3:20:32 PM
Hi,
I wrote a small c# programm, which generates an xml-string by serializing a
class and sends it to a server. Now I want to change some values in that
xml-string.
The only way for me to do that might be, to deserialize it, change the
particular attribute and serialize it again, to finall... more >>
Eliminate nullable types when serializing...
Posted by christopherkilmer NO[at]SPAM gmail.com at 1/31/2006 10:03:05 AM
I'm doing a little R&D. I've got a simple object:
public class AccountNullable
{
private int? _AcctID;
private string _AcctName;
[XmlElementAttribute(IsNullable = true)]
public int? AcctID
{
get { return _AcctID; }
... more >>
XSD.EXE issue
Posted by Kapil Joshi at 1/31/2006 9:44:28 AM
Hi Folks,
I was trying to import this schema using XSD.EXE tool. After the import into
a C# file, i created an object of type "result" and tried to serialize it to
XML file. This causes an exception to be thrown.
Please could some one let me know what the issue is?
Thanks and Regards,
... more >>
xsl magic
Posted by Jerry Langley at 1/30/2006 12:29:27 PM
I have an xml document containing properties for a group of hyperlinks.
Currently my xsl:stylesheet contains code as follows:
<a href="{concat(/links/@webroot,@url)}" title="My ToolTip Here">
<xsl:value-of select="@name"/></a>
I want to replace "My ToolTip Here" with the contents of the @descr... more >>
Using Xpath functions?
Posted by amessimon at 1/30/2006 12:15:33 PM
Hi, im trying to use the Xpath function "reverse" with an XmlTextReader.
Im not sure if i need to add a namespace to reference this function or
what, if so whats the address of the namespace. Can anyone give me an
idea where i am going wrong here?
So far....
Dim strXmlFeedUrl As String ... more >>
remove my carriage returns
Posted by mgonzales3 at 1/30/2006 12:04:04 PM
i have a xml w/four carriage returns and for some reason this is preventing
me from executing my xpath queries. What is the best way to remove these?
thanks
... more >>
Complex Type Collision with XSD.exe
Posted by brian.gabriel NO[at]SPAM gmail.com at 1/30/2006 10:53:09 AM
I am having difficulty coming up with an elegant solution to a problem
that I am having. I have a web service that processes different types
of requests and return the appropriate response. Each request and
response type has its own schema, and requests and responses are in
different namespace... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Compare two Schemas
Posted by Ganesh Muthuvelu at 1/30/2006 7:18:31 AM
Hello,
How can I compare or visually check the differences between two XML schemas.
Let us say I have two files like "version_1.xsd" and "version_2.xsd" , how
would I programtically find out the differences between these two XSD files?.
Is there a way to do this in .NET?
Thanks,
Ganesh... more >>
how to add namespace prefix declarations to a new XmlDocument
Posted by Andy Fish at 1/30/2006 12:00:00 AM
Hi,
I am creating a new XmlDocument from scratch, but I can't see how I can make
a namespace declaration and associate a prefix with it. For instance in the
following example:
XmlDocument doc = new XmlDocument();
XmlElement el = doc.CreateElement("foo:data");
doc.AppendChild(el);
doc.Sa... more >>
Unknown error in XmlSerializer
Posted by Brecht Yperman at 1/30/2006 12:00:00 AM
Hi,
when calling the XmlSerializer constructor, I get the following error:
Top Level Exception
Type: System.IO.IOException
Message: Unknown Error (-1).
Source: mscorlib
Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String
str)
at System.IO.FileStream..... more >>
How do I display images from an XML doc that are in this format>>
Posted by Lee810 at 1/29/2006 4:50:28 PM
The xml doc has pictures but in the format of a very long character string.
I'm not sure what this format is called so I do not know what type of
converter I should be looking for. May have something to do with base64. I
want to read it from the xml doc and display it in a windows form pict... more >>
How to: Omit Deafulted Elements from XML When Serializing
Posted by Charles Law at 1/28/2006 6:36:10 PM
I have a complex object that I am serializing, and I would like to omit
elements that have a default value.
For example, if I have a class as follows
Public Class Test
Private m_Name As String = "George"
Private m_Active As Boolean = False
Private m_Address As String
... more >>
XmlSerializer fails to serialize xsd.exe generated classes
Posted by cd~ at 1/27/2006 9:06:09 AM
I can provide a test app, the news server won't allow me to post the files
because they are too large (93KB and 1.2KB)
I downloaded the ESRI ArcXml schema and generated the classes from the
schema using xsd.exe, which took a while because xsd doesn't handle
recursive elements very well (StackO... more >>
Standard datetime format?
Posted by Chris Ashley at 1/27/2006 6:26:27 AM
Hi,
I have an XML web service which accepts a few datetime values. We have
some clients using it who are using different systems (java etc) and
they need to know what the standard format for a datetime node should
be? Have tried DD/MM/YY but no luck. Anybody know?
Thanks,
Chris
... more >>
XML with no schemaLocation
Posted by CB at 1/27/2006 5:35:18 AM
I have some XML instance documents that specify schemas via the xmlns
attribute.
I need to load these documents (with XmlDocument) and have them
verified against the XSD's that are mentioned.
However, the documents are intended to be shared between machines but
the location of where the XSD... more >>
Querying the last 2 ids for displaying
Posted by Aaron at 1/26/2006 4:25:13 PM
Hello,
How can pull the last 5 ids in a list for displaying?
Display.xsl
<xsl:template match="/">
<xsl:for-each select="document(/Filings/File/@href)/DataCollected">
<xsl:sort select="@id" order="ascending" />
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:template>
F... more >>
Strange error validating XML against XSD
Posted by Cesar at 1/26/2006 4:00:02 PM
Hello,
I've developed a .NET C# web service; which has one method named, let's say,
upload_your_data. This method has one parameter ( string your_data). The
value that this parameter will actually have is the content of a XML
document. This data will be processed and check for a well-formed... more >>
XSD Schema - nillable fields in keyref
Posted by svestin NO[at]SPAM bigfoot.com at 1/26/2006 7:09:18 AM
Hi All!
I run into a problem defining a XSD schema with KEYREF references.
Is it possible to use KEYREF with nillable fields?
Just like a database where a FK could be null.
In the example below the tag <Owner> is nillable
and also used as FIELD in the KEYREF.
Run this in Visual Studio ... more >>
vs2005 xsd.exe: Can it generate different files?
Posted by MattBell at 1/26/2006 6:56:04 AM
Is there an option to get the vs2005 xsd.exe tool to generate seperate files
for each class that it generates? It would be much easier from a maintenance
standpoint than one big giant file for my classes.
Thanks for any help
Matt
... more >>
String function to end at a specific point
Posted by Aaron at 1/25/2006 10:54:31 PM
Hello,
I have this portion of code:
<xsl:value-of select="substring(Body,1,400)" disable-output-escaping="yes"
/>
Is it possible to code it to stop when it reads the first </p> instead
of 400.
TIA
Aaron
... more >>
Microsoft support for XPointer and XLink
Posted by Daniel at 1/25/2006 2:05:51 PM
Microsoft support for XPointer and XLink
what micrsoft technologies support XPointer and XLink?
... more >>
parsing XML in C#
Posted by MR at 1/25/2006 12:00:00 AM
i apologize in advance for what i know is a simple question and for
reposting (albeit with more specifics as to what I need) , but i am being
exposed to the first time to xml and have not been able to begin to resolve
this problem.
(i am able to do string manipulations, i.e. indexof and substr... more >>
A Bug in the .NET XSLT Engine?
Posted by jrwarwick NO[at]SPAM hotmail.com at 1/24/2006 10:26:23 PM
Hello, I believe I have uncovered a bug in the .Net XSLT engine to do
with 'for' loops in XSLT.
Here are the steps to reproduce it:
-Create A new webform project.
-Add the xml file 'errorexample.xml' - it is shown at the bottom
-Add the xslt file 'errorexample.xslt' - it is shown at the botto... more >>
Finding out if attribute X exists with XmlTextReader
Posted by Gustaf at 1/24/2006 8:53:08 PM
My docs have attributes called "order", with a default value of 1. So if
there is no "order" attribute, the program shall use the value 1.
Implementing this with XmlTextReader was harder than expected. Since
GetAttribute() returns null if the attribute isn't found, and null can
be interprete... more >>
convert from excel xmlmap export format to dataset?
Posted by SL at 1/24/2006 6:15:18 PM
Hi - I'm fairly new to manipulating xml and I have an excel workbook and =
on one of the sheets is apparently a listobject... using it's =
xmlmap.export function I get an xml file that looks like this (truncated =
of course, you get the idea):
<?xml version=3D"1.0" encoding=3D"UTF-8" standalon... more >>
Confused! Can I create an XML document from an XSD file?
Posted by Ray Stevens at 1/24/2006 12:42:05 PM
I am confused. I was given a fairly complex xsd schema for use in a project.
When I added this to a website in VS 2005, it shows up in intellesense and I
can instantiate, manipulate it etc. with the following code in the BLL
layer:
public LXML CreateLXML(ref Tsrsubi1.Xormsga2 etx)
{
LXML ... more >>
Serializing Array with array "name" in the XML
Posted by Rick Francis at 1/24/2006 11:51:11 AM
I need help serializing an array without including the array "name". I am
writing in C# and using the XmlSerializer to serial classes.
I am trying to serialize a class with an array in it like the one below.
public class myclass
{
public imagecontext;
public myimage[] images;
}
... more >>
Serializing Array without Array
Posted by Rick Francis at 1/24/2006 11:34:36 AM
I need help serializing an array without including the array "name". I am
writing in C# and using the XmlSerializer to serial classes.
I am trying to serialize a class with an array in it like the one below.
public class myclass
{
public imagecontext;
public myimage[] images;
}
... more >>
how do I use namespaces with XPathNavigator?
Posted by Andy Fish at 1/24/2006 12:00:00 AM
Hi,
I can't figure out for the life of me how to select nodes using a namespace
in XpathNavigator. For example:
XPathDocument doc = new XPathDocument("file.xml");
XPathNavigator nav = doc.CreateNavigator();
XPathNodeIterator itr = nav.Select("/foo:bar");
Throws the exception "N... more >>
What is the best way to remove XML namespace
Posted by Joe Bloggs at 1/23/2006 11:21:53 PM
Hi,
I am trying to remove the namespace in the root node in the following XML,
<ordersHistory xmlns="http://tempuri.org/Orders.xsd">
<order number="PO-1" added="12/12/2002">
<client name="Microsoft">
<address country="USA" city="Washington" />
<notes>
... more >>
XML Download with WebBrowser class
Posted by Kurt Waldheim at 1/23/2006 6:33:22 PM
Hi,
I want do download a XML file using the WebBrowser class. How can I
prevent that the file is converted to HTML code using a stylesheet.
Thanks,Kurt... more >>
XML Serialization of complex types as XML attributes
Posted by Paulo Morgado [MVP] at 1/23/2006 2:53:01 PM
Hi all
..NET Framework 1.1
I have created several types that are serailized to XML as strings. Someting
like this:
public struct MyInt32 : IXmlSerializable
{
int value;
public MyInt32(int value)
{
this.value = value;
}
public static implicit operator Int32(MyInt32 value)... more >>
beginning xml question
Posted by MR at 1/22/2006 11:33:22 PM
i apologize in advance for what i know is a simple question, but i am being
exposed to the first time to xml.
considering the following string that i receive:
<BusinessEntity xsi:type="DynamicEntity" Name="contact"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas... more >>
Innertext and XPathNavigator.Value
Posted by Jack Fox at 1/21/2006 6:26:24 PM
I'm navigating through a XPathDocument consisting of mostly mixed complex
type elements (i.e. innertext plus more elements). When I use
XPathNavigator.Value to retrieve the text I get everything between <mytag>
and </mytag>, the text I'm looking for, but also all the text portion of
every su... more >>
A question on joining more than one xml document to xsl file??
Posted by Aaron at 1/21/2006 11:34:19 AM
How do it bind the articlelink nodes in the layout.xsl??
I have several xml pages(art1.xml, art2.xml, so on) that I know how link
them up via articles.xml,
<?xml version="1.0" encoding="utf-8"?>
<articles>
<articlelink href="art1.xml"/>
<articlelink href="art2.xml"/>
......
</articles>
... more >>
XmlSerializer: Inheritance and Read-Only Properties
Posted by Michael Primeaux at 1/20/2006 5:29:37 PM
All,
Please maximize for easier viewing. Assume I have a class structure as
follows:
[Serializable]
public class Foo
{
private string _hello = "Hello";
public string Hello
{
get
{
return _hello;
}
}
}
public class Bar : Foo
... more >>
problem consuming my service
Posted by s at 1/20/2006 12:19:03 PM
'project with web service
<webmethod()> _
public function myws(id as integer)
'do db stuff with id and build document
Dim xd As New XmlDataDocument
xd.Load("D:\Inetpub\webservice_xml\redbook.xml")
Return xd
end function
---------------------------------------------------------... more >>
Does .Net XML Library support both SAX and DOM Model?
Posted by Baron at 1/20/2006 4:34:17 AM
Problems inserting repeating node.
Posted by PaulF at 1/19/2006 4:18:03 PM
I am trying to do add a repeating XmlNode into and existing XML document and
have had some problems.
The base XML:
<Property>
<Premises>
<Endorsement>
<ShortWording/>
<Wording/>
</Endorsement>
<Address>
<Line1>41 Acacia Avenue</Line1>
<Line2>Town</Line2>
<Line3... more >>
Using XPath to build a Breadcrumb menu.
Posted by Mike at 1/19/2006 3:32:02 AM
Hi,
I'm a complete newbie to XML and am needing to rush through a job requiring
far more knowledge than I have the time to gather.
Basically... I need to build a breadcrumb menu for our website, using a
passed URL and an XML menu string, what has been retrieved from an SQL server
(we nee... more >>
Forcing Visual Studio to validate XML against a schema
Posted by Buddy Ackerman at 1/18/2006 8:19:13 PM
When I have an XML document in my project how can I force it to use a
particular schema (i.e. and enable intellisense) for the document. The
project is in source safe so I need a solution that works for every
developer that opens the document.
Thanks.
--Buddy
... more >>
optional nillable values
Posted by Phil Lee at 1/18/2006 5:25:21 PM
Hi,
I have added an optional nillable element to a schema like this -
....
<xs:element minOccurs="0" maxOccurs="1" name="Id" type="xs:int"
nillable="true"/>
....
A class is generated from this using xsd.exe and which is used by a web
service where it makes it's way into the wsdl as:
... more >>
Combine portions of multiple xml files into 1 xml file using xsl i
Posted by PK9 at 1/18/2006 2:20:03 PM
I'm building a windows app using C#. The goal is to merge portions of
multiple xml files into one.
I currently have an .xsl stylesheet that pulls in the required sections of
multiple xml files and combines them into one xml file. This xsl works
correctly.
I'm now trying to utilize th... more >>
XML Web Service Asynch Result Error in Generated Code
Posted by Matthew Frederick at 1/18/2006 1:52:04 PM
Hope this is the best forum for this, any suggestions for another are
appreciated.
I have a simple Compact Framework (2) app that sends some data to a web
service and acts despending on the response. I added the web service as a web
reference (in VS2005 VB) and then have a bit of code that ... more >>
How to implement IXMLSerializable
Posted by theburnetts NO[at]SPAM yahoo.com at 1/18/2006 5:49:42 AM
I have a complex class heirarchy where all of my classes inherit from a
single base class (BaseObject) and this BaseObject class inherits from
XPBaseObject. XPBaseObject is a 3rd party base class from Express
Persistent Objects (XPO) from DevExpress. It looks kind of like
this...
BaseObject... more >>
Implementing XML Base?
Posted by Gustaf Liljegren at 1/18/2006 4:55:37 AM
I'm reading a document with the XmlTextReader, and I want to make it XML
Base aware, so I need to implement this somehow. What's the most
effective way of doing it?
I imagine having a variable that's keeping the current base URI, and
then look for an xml:base attribute at every new start el... more >>
BinaryFormatter slower than DataTable.Save!?
Posted by windsurfing_stew NO[at]SPAM yahoo.com.au at 1/17/2006 9:09:15 PM
Hi All,
I was saving a DataTable out to disk using DataTable.Save(). Later
loading it with DataTable.Load().
In order to get greater performance I replaced these two calls with
BinaryFormatter.Serialize() and BindaryFormatter.DeSerialize. Both of
these used a FileStream to work with files... more >>
Is IIS necessary for hosting XML Web Services ?
Posted by Peter at 1/17/2006 6:30:02 PM
I am new to ASP.NET development and have a question on hosting Web Services:
When I create a XML Web Services project (server-side) in Visual Studio
2005, my Web Services file (.asmx) will be hosted by an Internet Information
Server (IIS).
I'm just wonder if I can host a Web Services wit... more >>
Conditional XML serialization???
Posted by Vinayak Kamat at 1/16/2006 1:55:18 PM
Hi,
I've got two classes - Entity which will have an array of Child objects
in it and Child class.
class Entity
{
public Child[] Children;
}
class Child
{
public string Name;
public string Description;
}
I want to be able to serialize this class into two different XMLs.
... more >>
|