all groups > dotnet xml > january 2006 > threads for january 22 - 28, 2006
Filter by week: 1 2 3 4 5
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 >>
Don't see what you're looking for? Search DevelopmentNow.com.
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 >>
|