Applied XML Programming for Microsoft .NET
by Dino Esposito
Pro LINQ: Language Integrated Query in C# 2008
by Joseph C. Rattz Jr.
Microsoft® .NET XML Web Services Step by Step
by Adam Freeman; Allen Jones
JavaScript: The Good Parts, 1st Edition
by Douglas Crockford
Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition
by Andrew Troelsen
Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition
by Matthew MacDonald
Programming Entity Framework, 1st Edition
by Julia Lerman
Cloud Application Architectures, 1st Edition
by George Reese
If you're seeking ways to build network-based applications or XML-based web services, Microsoft provides most of the tools you'll need. XML is integrated into the .NET Framework and Visual Studio .NET, but if you want to get a grasp on how .NET and XML actually work together, that's a different story. With .NET & XML, you can get under the hood to see how the .NET Framework implements XML, giving you the skills to write understandable XML-based code that interoperates with code written with other tools, and even other languages. .NET & XML starts by introducing XML and the .NET Framework, and then teaches you how to read and write XML before moving on to complex methods for manipulating, navigating, transforming, and constraining it. To demonstrate the power of XML in .NET, author Niel Bornstein builds a simple hardware store inventory system throughout the book. As you move from chapter to chapter, you'll absorb increasingly complex information until you have enough knowledge to successfully program your own XML-based applications. This tutorial also contains a quick reference to the API, plus appendices present additional .NET assemblies that you can use to work with XML, and how to work with the .NET XML configuration file format. One study puts the potential market for new software based on XML at or near $100 billion over the next five years. The .NET Framework gives you a way to become a part of it. But to use XML and .NET effectively, you need to understand how these two technologies work together. This book gives you the insight to take full advantage of the power the two provide.
Average Amazon.com® Rating: ![]()
![]()
![]()
![]()
Based on 8 Ratings
Very Disappointed - 2005-09-12
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Note that I decided to write this review because I could not believe that so many people wrote so nice reviews about this book. My assumption is that someone or some people are really trying to sell this book, because this book is definitely not that good whatsoever.
Actually, this book is definitely not what I expected from a .NET/XML book. I was expecting a practical book with some theory, a good description about .NET's XML implementation and good examples. This is not what this book included. I'm very flexible with books. It's impossible that every book will be perfect. Actually, most aren't, so you have to get used to it, but again this book is for the most part terrible, unless you only want to get a general idea of how to use XML with .NET, otherwise get a different book. Again, I don't know where the reviews for this book came from, because this book is really not that good.
To name a couple of things that I find wrong with the book, lets start with the examples included. Two words: they suck! Each chapter is pretty much like this: here is the general theory, some of it unnecessary like the constant reference to W3C stuff; then, here are a few lame, simple examples without much substance; now, lets go to the next chapter.
The first time I looked inside the book I was looking for information about how .NET did Xml Validation, and it is just terrible. I actually found more information out of general .NET books I already had, than from this one. And when you are working on a project where you need this information, and you have a book that's suppose to help you with this stuff, it is very disappointing to find out that the book is pretty much irrelevant.
You would assume validation is a very important XML topic, among many others, but there's really not a lot of info on it. Actually, if you look on the book's index, you'll see that about half the related info is in the reference section, which you could get out of MSDN anyway. BTW, almost half of the book is simply reference for the different .NET XML namespaces. Again, the same data you could get out of MSDN.
In any case, I know there's not much else to choose from, but pretty much anything else might be as good or possibly way better...
Just what I was looking for! - 2004-12-13
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Over the years, I've found it increasingly difficult to buy technology related books simply because of the speed in which they become obsolete. So now I look at each book as not only an instructional tome, but whether or not it will be useful 6 months down the road as a reference. This book (like many of O'Reilly's titles) has easily earned a place in my library.
Mr. Bornstein's method of writing seems to fit very well with the way I learn, and his coverage of the subject matter makes this book a great resource when I'm trying to remember the exact syntax of a specific method call.
Hardly a Java book! - 2006-04-13
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
A careful reader would have noticed the "using" keyword in the code sample, and realized that this is C#, not Java. I found this book a good supplement to the MSDN; its well-conceived examples got me off to a good start in this area.
aaaarrrrggggg Who wants java examples in a .net book - 2006-03-09
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
i was looking for example on using the System.xml.serialize name space. This is the example copied from the book
public enum AddressType {
Home,
Office,
Billing,
Shipping,
Mailing,
Day,
Evening,
FAX
}
If you'll look again at Example 9-7, you'll see that each state is actually listed by its full name, not the abbreviation as listed in the State enumeration. Here I've added an XmlEnumAttribute for each state name. Note that I've skipped some in the interest of space:
public enum State {
[XmlEnum(Name="Alaska")]
AK,
[XmlEnum(Name="Alabama")]
AL,
[XmlEnum(Name="Arkansas")]
AR,
[XmlEnum(Name="Arizona")]
AZ,
// ...
[XmlEnum(Name="Washington")]
WA,
[XmlEnum(Name="Wisconsin")]
WI,
[XmlEnum(Name="West Virginia")]
WV,
[XmlEnum(Name="Wyoming")]
WY
}
The Address class has one attribute, type, and four elements. Here I've added XmlAttributeAttribute and XmlElementAttribute, as appropriate. The AttributeName and ElementName fields of each attribute are used to set the names of the XML attributes and elements, respectively:
public class Address {
[XmlAttribute(AttributeName="type")]
public AddressType AddressType;
[XmlElement(ElementName="street")]
public string[ ] Street;
[XmlElement(ElementName="city")]
public string City;
[XmlElement(ElementName="state")]
public State State;
[XmlElement(ElementName="zip")]
public string Zip;
}
Similar to Address, the TelephoneNumber class has one attribute and three elements. Again, I've decorated each member with the appropriate attribute. Note also that here, as in Address, I've set the names of the attributes and elements to match the ones in the XML; that is, they all start with lowercase letters:
public class TelephoneNumber {
[XmlAttribute(AttributeName="type")]
public AddressType AddressType;
[XmlElement(ElementName="areacode")]
public string AreaCode;
[XmlElement(ElementName="exchange")]
public string Exchange;
[XmlElement(ElementName="number")]
public string Number;
}
Now we come to the meat of the personnel record, the Employee. This class has three attributes: firstname, middleinitial, and lastname, which I've treated with the appropriate attribute. However, the Employee class also has two additional elements, addresses and telephones. These two elements actually contain nested arrays of elements, so I've used the XmlArray and XmlArrayItem attributes to help the serializer figure out what to do with the XML elements it reads:
public class Employee {
[XmlAttribute(AttributeName="firstname")]
public string FirstName;
[XmlAttribute(AttributeName="middleinitial")]
public string MiddleInitial;
[XmlAttribute(AttributeName="lastname")]
public string LastName;
[XmlArray(ElementName="addresses")]
[XmlArrayItem(ElementName="address")]
public Address [ ] Addresses;
[XmlArray(ElementName="telephones")]
[XmlArrayItem(ElementName="telephone")]
public TelephoneNumber [ ] TelephoneNumbers;
[XmlAttribute(AttributeName="hiredate")]
public DateTime HireDate;
}
Here's the document element, personnel, which is decorated with XmlRootAttribute. Although the Employees member is an array of Employee objects, it is not a nested array, like addresses and telephones. By adding the XmlElement attribute directly to the member, the XmlSerializer knows that this member is to be serialized as an array of employee elements, without a separate top-level element:
[XmlRoot(ElementName="personnel")]
public class Personnel {
[XmlElement(ElementName="employee")]
public Employee [ ] Employees;
}
Finally, I've made some changes to the Serializer class, which I introduced in Example 9-5. Serializer's Main( ) method still uses the CreatePersonnel( ) to create some personnel records, but it then instantiates an XmlSerializer to deserialize the objects it created back out to a file:
public class Serializer {
public static void Main(string [ ] args) {
Personnel personnel = CreatePersonnel( );
XmlSerializer serializer = new XmlSerializer(typeof(Personnel));
using (FileStream stream = File.OpenWrite("Personnel.xml")) {
serializer.Serialize(stream,personnel);
}
}
}
notice its in java??? for crying out loud if your going to say .net and xml use .net examples not JAVA
Well written reference primer - 2009-07-01
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
This is a first edition book on the .net platform's foundation Xml libraries. It was written more than five years ago, but still remains an excellent resource to anyone trying to get a handle on all those angle brackets (especially if you've just been thrown at a project with minimal exposure to Xml, and you think that learning LINQ sounds like wayyy too much work. Not that such a thing would ever happen in the software development world, of course). Bornstein's writing is quick and engaging, and most importantly: helpful.
That being said, it is an older book, pre-dating even .net 2.0, so some of what is discussed is depricated material. Perhaps surprisingly, quite a bit of the material is still relevant in this modern .net 3.5 (soon 4.0) / Silverlight era.
I wish there was a second edition, so I could give five stars.
Top Level Categories:
Internet/Online
Markup Languages
Programming
Sub-Categories:
Internet/Online > .Net
Internet/Online > XML
Markup Languages > XML
Programming > .NET
Some information on this page was provided using data from Amazon.com®. View at Amazon >