for a business application in C# I have a more complex object representing an article. Attached to this object there are numerous further objects representing the suppliers, prices, storage locations and quite a few things more. These objects in turn may have further objects or collections with further information. In the end the whole structure represents everything we have in the database concerning this article. Please note, this is not a DataSet. It's a complex data object loaded from the database with NHibernate.
Now we would like to serialize selected articles to XML. We have prepared a XML schema, but now it's the question how we proceed with serializing. I could simply use a XmlWriter class and provide each data object with a method to serialize itself and recursively all attached objects and collections, but I hope there is a better way.
Is there a way to associate the schema with the data objects and their properties and then serialize the data objects with the bonus of not having to write serialization methods for each and every data object and also validation against the schema?
Edit: I took a closer look at the System.Xml.Serialisation namespace, but unfortunately this will not help in this case. The problem is that I would have to decorate a collection of articles with the XmlRoot attribute. Due to the number of articles to be serialized I cannot simply fill some kind of collection and then serialize everything. It must be done one article at a time.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
i hav made an xml file..as well as an xsd file..i need to refer this xsd file in the xml file..
what should i include in the <xs:schema> tag of the xsd file..?? and what to include in the <root> tag of the xml file..
these r my xsd and xml files respectively..
<xs:element name="name" type="xs:string">
<xs:element name="age" type="xs:string">
This will define the xs prefix and the namespace you want to create.
Within your xml file you have to put a reference to the schema by changing the root to this:
Here the namespace is imported without a prefix. But pay attention if you need to validate the xml (if it is valid according to the schema). The reference will be resolved by a DefaultResolver. This one will not find the schema file until you give it a hint.
GIDS is the Biggest Independent Summit for India's IT Professional Ecosystem. Registration for Event Open.
Bangalore, February 26, 2010: JavaServer Faces is a Java-based Web application framework intended developed to simplify development integration of Web-based user interfaces. It is often mentioned together with Ajax, a combination of technologies that makes it possible to create rich user interfaces. Since JSF supports multiple output formats, Ajax-enabled components can easily be added to enrich JSF-based user interfaces. Oracle's Frank Nimphius says that Service Oriented Architecture (SOA) has become a reality in modern software development but Web services don't have a user interface. This is fine if communication is between machines. But what about human interaction like in data entry and work flow? Users need an application display they feel comfortable working with. So what about building Web 2.0 user interfaces for service oriented architectures? Does it work, or does it hurt - and if so, how bad is it? Frank is coming this summer to India's biggest summit for the software developer ecosystem - Great Indian Developer Summit (http://www.developersummit.com/) to show how JavaServer Faces can be used to build compelling Ajax user interfaces for Web Services models giving end users a comfortable working environment that includes client side validation and user interface customization.
In his second session at GIDS 2010, Frank addresses the topic of implementing automatic UI refreshes. To web application users, it must appear as if the Web reinvents itself once a year with more interactive UIs, increasing performance through partial page refreshes, and desktop-like usability patterns that allow users to become as productive using web applications as they are using real desktop clients. One technical detail, though, hasn't changed in the past and is unlikely to change in the near future: HTTP. Hypertext Transfer Protocol is based on the request-response principle in which the client sends a query to the server and the server responds with the requested data. Between requests, no connection is maintained between the client and the server that would allow server-side logic to send more data unasked. Any changes in the underlying data layer used by an application are first detected within the next client request. Hopefully, it doesn't come to you by surprise when we say that in the modern days of Web 2.0 and Rich Enterprise Applications (REA), the Web still is disconnected and stateless. So, in these modern days of Web 2.0 and Rich Enterprise Applications (REA), is the Web still is disconnected and stateless? Not really, because you frequently use some applications on the Web that update their client UIs with server-side changes without your needing to do anything. The question, therefore, is how this was accomplished and whether you can do the same in JavaServer Faces. In his session, Frank will guide attendees through the options that are available in AJAX and other implementation technologies of Rich Internet Applications (RIA) to implement automatic UI refreshes.
Frank Nimphius is a principal product manager for application development tools at Oracle Corporation since 1999. He actively contributes to the development of Oracle JDeveloper and the Oracle Application Development Framework (ADF). He represents the Oracle J2EE development team at J2EE conferences world wide, including various Oracle user groups and the Oracle Open World conference. The talk 'Building Web 2.0 User Interfaces for Web Service Models using JSF' will be co-presented by Jobinesh Purushothaman. Jobinesh Purushothaman is an enterprise Java specialist with 10+ years of experience in the industry. He is involved in design and architectural decisions of various products using ADF and JavaEE technologies. He is interested in developing more simplified enterprise technologies where developers can focus on their business solutions rather on the technology complexities.
About Great Indian Developer Summit
Great Indian Developer Summit is the gold standard for India's software developer ecosystem for gaining exposure to and evaluating new projects, tools, services, platforms, languages, software and standards. Packed with premium knowledge, action plans and advise from been-there-done-it veterans, creators, and visionaries, the 2010 edition of Great Indian Developer Summit features focused sessions, case studies, workshops and power panels that will transform you into a force to reckon with. Featuring 3 co-located conferences: GIDS.NET, GIDS.Web, GIDS.Java and an exclusive day of in-depth tutorials - GIDS.Workshops, from 20 April to 24 April at the IISc campus in Bangalore.
At GIDS you'll participate in hundreds of sessions encompassing the full range of Microsoft computing, Java, Agile, RIA, Rich Web, open source/standards, languages, frameworks and platforms, practical tutorials that deep dive into technical skill and best practices, inspirational keynote presentations, an Expo Hall featuring dozens of the latest projects and products activities, engaging networking events, and the interact with the best and brightest of speakers from around the world.
For further information on GIDS 2010, please visit the summit on the web http://www.developersummit.com/
A Saltmarch Media Press Release
Ph: +91 80 4005 1000
I am using Visual Studio 2005 to create my first XML Schema. Generally it's going well. The intellisense in VS is very helpful.
My only issue is that VS is flagging the element "Well" in my example, saying "The type attribute cannot be present with either simpleType or complexType." I'm not sure how to structure it if this way isn't acceptable. I've also included a XML snippet of what I am trying define in the schema.
There are one, two or three DBDocument nodes inside a DBPart node
My thinking at the moment is that the approach of the xsl is wrong and it should use templates more, but I have very little experience with this stuff and am trying to get my head around how xsl templates work. I assume that I need to get the DBDocument information first,and then go back and fill in the rest. I just don't know how to do that.
OK, here is a simplified version of the input xml.
I have removed data from nodes I am not interested in, but left the nodes so you can get a feel for the structure.
There are two records (DBFile nodes) here - the first one has a single file, the second has two files (i.e. 2 DBDocument nodes).
Person 2 should end up with two records - one for File 2 and one for File 3.
I have a very large XMLDocument with 56,000 child records each having 8 child field elements. The application that i have written performs a complicated process on the XML. It can process 10,000 records in 5 minutes and 20,000 in 25 minutes (increases exponentially) but takes maybe 10 hours to process the 56,000 record (which is unacceptable). Whats the best way to de-batch this XML Document into bite size chunks (eg 10,000 and after 5 iteration will process 50,000. which will execute in 25-30 minutes processing time)
How many megabytes is your xml file?
Does the "complicated process" operate on
only one of the 56,000 children independantly,
without refferencing the other children ?
Show me a childNode and tell me about
this "complicated process".
How much free memory does your computer have available ?
Last Visit: 31-Dec-99 18:00 Last Update: 16-May-21 2:53