XML is a extremely adaptable and simple language to make use of, it’s also remarkably beneficial in a raft of applications. Usually it is often employed to markup data and after that transport and store the data over the internet or across different systems and software.
Its main durability has been that because it's plain text markup, it can be used to transport and also present data all around a wide variety of systems and web browser types, that is because it is not really platform dependant. So when you have got diverse systems or browsers, the information can still be displayed as desired by the developer of the information.
This simplicity and versatility takes on a new direction if you think about web development, particularly web form development.
The conventional method involves utilising an external JavaScript to verify your form. You define your parameters or rules in your JavaScript file and when a visitor enters data into your web form and hits submit, the data is validated by your JavaScript before it accepts and communicates the data to you.
XML however will take web form validation to another level, simply create an xml vocabulary and add your file to your website. Be sure you maintain xml terminology simple, concise and uncomplicated to be aware of as best practice.
As much as these 3 uncomplicated principles may seem to overlap, its still well worth remembering they are actually standalone points. It has to be simple so that it can be done and also parsed quickly. It must be succinct to help keep errors down to a minimum and it needs to be clear and understandable so that others can look at it and understand without the understanding of the original author.
It’s moreover worth mentioning that xml form validating is purposefully easy and not really extensive. Because of this you won’t be able to validate distinct form fields like, text in one along with numbers in another, say phone number or date etc at once or at the same time ie text and date.
To make your validation xml file, you have got to be aware of a number of important xml elements and attributes, in order to define your rules or parameters.
With your form you need to define all elements as <element> and attributes as <attributes>.
The significant attributes to know are “sameas”, this attribute is set corresponding to the id of another element, typical uses consist of when entering a password or email address in which you will want the person to enter it 2 times to reduce blunders.
Another needed attribute is the “name” attribute, which is often used in the auto-generation of error messages.
You will find further more elective attributes such as “min”, indicating the lowest quantity of characters, and “max” specifying the greatest number.
Another suggested attribute is “req”, that is set to true or false, and describes whether the input has to be completed or not.
This can be simply the crucial attributes of any validation form, as well as a script file which will check first that this browser works with the xml files.
Additional information may be found in any good xml tutorial or you can also employ an xml tool just like an xml validator to produce and validate your xml file.
Sunday, 14 June 2015
Sunday, 17 May 2015
The extensive guide to utilizing xml
XML is a markup language that is part of a family of associated technologies that let you work with info in a prepared method.
Due to the fact XML tags have no semantic meaning you could make use of it for all types of things from displaying content over the internet to holding data including lists of ingredients, books and so forth. The key point is that the tags don't have any semantic significance or rules in order to build your own tags for whatever function.
So for instance, you happen to be food manufacturer and you also need a document for your food labels, you could produce a complete amount of relevant tags to maintain your food label data, for example <calories>, <nutrition>, <ingredients> and the like.
Its essential to remember that XML is simply text so you can use any plain text editor to generate your XML file or if you prefer, you may use a dedicated XML Editor tool. The main advantage of the latter is you can create your XML content quicker and even more accurately as a dedicated xml tool will also have its own xml validation feature along with features like auto complete as well as syntax highlighting etc.
The other feature is that this can also examine your xml for errors for example wrong xml or extra tags or faults in the syntax and you will even specify what order the tags must appear in, what the attributes can incorporate, the values etc
After this you basically run your xml through the validator to make certain the xml data is just as you desire it.
The other benefit of xml is that you may also style up your file by attaching a css it to it, the css is made up of your style rules for example colours, font type and size etc.
To make your css work, basically save it in the same directory as the xml file and also open your xml file inside an upto date internet browser and it ought to display the xml data with your style properties.
Really the only disadvantage to be aware of with this particular technique is that your browser will have to be able to handle css and not all information can be extracted or exhibited as designed.
The way to overcome this is make use of transformations, known as XSLT, which symbolizes extensible stylesheet language. This could possibly also be used to not only convert xml, but they can also be used to change an xml file into plain html file, which can be displayed or viewed on any internet browser.
Finally, using css within your xslt you can also carry out fancy transformation which can look far better than the plain html option as a result of additional styling options which can be seen in the more recent browsers, although for older internet browsers it does not work.
There are other ways in which you may use xml as well, you can put it to use to dynamically produce html and pdf documents based on user requests, this really is extremely powerful and useful.
Due to the fact XML tags have no semantic meaning you could make use of it for all types of things from displaying content over the internet to holding data including lists of ingredients, books and so forth. The key point is that the tags don't have any semantic significance or rules in order to build your own tags for whatever function.
So for instance, you happen to be food manufacturer and you also need a document for your food labels, you could produce a complete amount of relevant tags to maintain your food label data, for example <calories>, <nutrition>, <ingredients> and the like.
Its essential to remember that XML is simply text so you can use any plain text editor to generate your XML file or if you prefer, you may use a dedicated XML Editor tool. The main advantage of the latter is you can create your XML content quicker and even more accurately as a dedicated xml tool will also have its own xml validation feature along with features like auto complete as well as syntax highlighting etc.
The other feature is that this can also examine your xml for errors for example wrong xml or extra tags or faults in the syntax and you will even specify what order the tags must appear in, what the attributes can incorporate, the values etc
After this you basically run your xml through the validator to make certain the xml data is just as you desire it.
The other benefit of xml is that you may also style up your file by attaching a css it to it, the css is made up of your style rules for example colours, font type and size etc.
To make your css work, basically save it in the same directory as the xml file and also open your xml file inside an upto date internet browser and it ought to display the xml data with your style properties.
Really the only disadvantage to be aware of with this particular technique is that your browser will have to be able to handle css and not all information can be extracted or exhibited as designed.
The way to overcome this is make use of transformations, known as XSLT, which symbolizes extensible stylesheet language. This could possibly also be used to not only convert xml, but they can also be used to change an xml file into plain html file, which can be displayed or viewed on any internet browser.
Finally, using css within your xslt you can also carry out fancy transformation which can look far better than the plain html option as a result of additional styling options which can be seen in the more recent browsers, although for older internet browsers it does not work.
There are other ways in which you may use xml as well, you can put it to use to dynamically produce html and pdf documents based on user requests, this really is extremely powerful and useful.
Sunday, 12 April 2015
How you can show xml data online utilising XSL
XML is a mark-up language coded in plain text which you can use to show data in a absolutely consistent way and also as planned via the internet regardless of internet browser type or other hardware and software being used.
Nevertheless, it’s worth noting that XML by itself that is to say pure xml, is not cross browser compatible, to achieve this you could make use of xsl to convert your xml data into html.
XSL, short for xml stylesheet language, in this context it could be used to change xml files or data in text or html files or perhaps new xml documents.
In this short article, we are going to examine parsing our XML file by using the Microsoft DOM object, to really make the best us of many of the examples That means that you need to have it set up on your server. Just install the IE explorer and you will be ready to go.
To get going, the first thing you ought to do is start up the DOM project, the code is as follows;
<%
set xml = Server.CreateObject("Microsoft.XMLDOM")
%>
With the DOM running, you now are ready to load the xml document into your dom, to make this happen you employ the coding call xml.load.
To pull your data from your own xml file, you simply need to list the immediate path to your file, whether or not it is on your hard disk or on a webserver, for instance mywebsite.co.uk/myxmlfile.xml or c:/mydocuments//myxmlfile.xml
Having filled your xml data in to the dom, you are now ready to design your xsl document, using xsl.
To help make HTML by using XSL you simply produce out the values of the XML in between the HTML. This is very much similar to using ASP to publish out the values from a database in between HTML tags. Only the syntax is different. For example, if you were to create a variable to a page making it bold in ASP it could appear like:
<b><%=yourVar%></b>
In XSL it would look like:
<b><xsl:value-of select="elementName"></b>
XSL is composed in XML so this means all the syntax rules apply - Case Sensitive, Quotes around all attributes (including HTML), and all of the elements must have an finishing element (including HTML). This means that if you use <br> you must use </br>.
OK, so we got the practical ability to generate the value of an element to a page. This specific capacity will be worthless up to the point we've got the capability to navigate the XML elements. For instance, if you decide to use <xsl:value-of select="title"> with no other code, you'd get an error (or a blank screen). The reason behind this is that XML will allow elements using the same name this mean different things to co-exist in a document (assuming they are positioned differently).
Which means you must stipulate the exact location of the element you are trying to print to the page. As an example, the following could well be proper and would likely write out the title value (assuming you performed the header correctly:
<xsl:value-of select="item/book/title">
You can easily note that this operates rather like a directory framework - it's important to acquire the proper directory to obtain the value.
Nevertheless, it’s worth noting that XML by itself that is to say pure xml, is not cross browser compatible, to achieve this you could make use of xsl to convert your xml data into html.
XSL, short for xml stylesheet language, in this context it could be used to change xml files or data in text or html files or perhaps new xml documents.
In this short article, we are going to examine parsing our XML file by using the Microsoft DOM object, to really make the best us of many of the examples That means that you need to have it set up on your server. Just install the IE explorer and you will be ready to go.
To get going, the first thing you ought to do is start up the DOM project, the code is as follows;
<%
set xml = Server.CreateObject("Microsoft.XMLDOM")
%>
With the DOM running, you now are ready to load the xml document into your dom, to make this happen you employ the coding call xml.load.
To pull your data from your own xml file, you simply need to list the immediate path to your file, whether or not it is on your hard disk or on a webserver, for instance mywebsite.co.uk/myxmlfile.xml or c:/mydocuments//myxmlfile.xml
Having filled your xml data in to the dom, you are now ready to design your xsl document, using xsl.
To help make HTML by using XSL you simply produce out the values of the XML in between the HTML. This is very much similar to using ASP to publish out the values from a database in between HTML tags. Only the syntax is different. For example, if you were to create a variable to a page making it bold in ASP it could appear like:
<b><%=yourVar%></b>
In XSL it would look like:
<b><xsl:value-of select="elementName"></b>
XSL is composed in XML so this means all the syntax rules apply - Case Sensitive, Quotes around all attributes (including HTML), and all of the elements must have an finishing element (including HTML). This means that if you use <br> you must use </br>.
OK, so we got the practical ability to generate the value of an element to a page. This specific capacity will be worthless up to the point we've got the capability to navigate the XML elements. For instance, if you decide to use <xsl:value-of select="title"> with no other code, you'd get an error (or a blank screen). The reason behind this is that XML will allow elements using the same name this mean different things to co-exist in a document (assuming they are positioned differently).
Which means you must stipulate the exact location of the element you are trying to print to the page. As an example, the following could well be proper and would likely write out the title value (assuming you performed the header correctly:
<xsl:value-of select="item/book/title">
You can easily note that this operates rather like a directory framework - it's important to acquire the proper directory to obtain the value.
Friday, 20 March 2015
XPath, XSLT, and other XML Specifications
The wonder in relation to xml is in its ease that means it's usually understood by so many varying systems and programs, through word processing software, printers, to other display devices.
This is done very affectively in xml as it splits the content from the structure typically an xsd or schema document will define the structure of the xml document and the xml document itself will incorporate the content.
The most important factors you need to understand about xml have been in its syntax, this will aid publish basic and affective xml. Essentially each and every xml tag should have a beginning and end tag or opening closing tag. The < means the opening / beginning tag and the /> denotes the end or closing tag.
When you comply with these proper xml rules, known as being well-formed, to be correct and grasped across systems, xml has to be well formed and correct.
The other specs to be aware of is Infoset, this specification sets out more detailed rules and properties for what comprises a well formed xml.
Namespaces are yet another spec to be familiar with for making valid or well formed xml, if you have a document with lots of different xml type vocabularies it can lead to errors in terms of reading or parsing your xml.
Namespaces enable you to specify distinctive element and attribute names via unique URIs which you control. So for instance, you could have a rather common attribute referred to as colour, you could potentially then utilize a namespace prefix like twt, so twt:colour, this might then make it unique from the namespace declaration.
You will also eventually, require the services of some sort of xml api, the main kinds of xml api are event based and tree based.
An event-based API attempts to formalize the XML parsing operation by defining event interfaces that processors may use to serve up the docs information items to the program as these are parsed.
A tree-based API, alternatively, specifies an in-memory object model that provides the XML documents logical structure, that is made available to the software after the document have been parsed and loaded.
You might have also come across SAX, or Simple API for XML, it is a rising in popularity among developers since it allows them to tap or hook directly into the parsing process itself.
The other tree based API is DOM, or Document Object Model, that is really the most generally industry recognized technique.
Moving forward let’s take a glance at XPath, another method of producing xml documents, it gets its identity from its usage of “path” notations to find their way the hierarchy of xml documents. The XPath language will depend on a tree representation of the XML document, and gives the cabability to navigate around the tree, selecting nodes by a variety of conditions. In popular use (though not in the established specification), an XPath expression is frequently described simply as "XPath".
Last but not least, let’s take a quick look at xslt and its usefulness to xml, the XSLT vocabulary is yet another XML language that outlines a declarative, rules-based language for indicating the modification process. XSLT builds upon XPath to specify which parts of the source XML document needs to be altered towards the target document. The subsequent XML code illustrates the framework of a simple XSLT style sheet.
To acquire more information and to see sample code, you may make reference to xml tutorials here.
This is done very affectively in xml as it splits the content from the structure typically an xsd or schema document will define the structure of the xml document and the xml document itself will incorporate the content.
The most important factors you need to understand about xml have been in its syntax, this will aid publish basic and affective xml. Essentially each and every xml tag should have a beginning and end tag or opening closing tag. The < means the opening / beginning tag and the /> denotes the end or closing tag.
When you comply with these proper xml rules, known as being well-formed, to be correct and grasped across systems, xml has to be well formed and correct.
The other specs to be aware of is Infoset, this specification sets out more detailed rules and properties for what comprises a well formed xml.
Namespaces are yet another spec to be familiar with for making valid or well formed xml, if you have a document with lots of different xml type vocabularies it can lead to errors in terms of reading or parsing your xml.
Namespaces enable you to specify distinctive element and attribute names via unique URIs which you control. So for instance, you could have a rather common attribute referred to as colour, you could potentially then utilize a namespace prefix like twt, so twt:colour, this might then make it unique from the namespace declaration.
You will also eventually, require the services of some sort of xml api, the main kinds of xml api are event based and tree based.
An event-based API attempts to formalize the XML parsing operation by defining event interfaces that processors may use to serve up the docs information items to the program as these are parsed.
A tree-based API, alternatively, specifies an in-memory object model that provides the XML documents logical structure, that is made available to the software after the document have been parsed and loaded.
You might have also come across SAX, or Simple API for XML, it is a rising in popularity among developers since it allows them to tap or hook directly into the parsing process itself.
The other tree based API is DOM, or Document Object Model, that is really the most generally industry recognized technique.
Moving forward let’s take a glance at XPath, another method of producing xml documents, it gets its identity from its usage of “path” notations to find their way the hierarchy of xml documents. The XPath language will depend on a tree representation of the XML document, and gives the cabability to navigate around the tree, selecting nodes by a variety of conditions. In popular use (though not in the established specification), an XPath expression is frequently described simply as "XPath".
Last but not least, let’s take a quick look at xslt and its usefulness to xml, the XSLT vocabulary is yet another XML language that outlines a declarative, rules-based language for indicating the modification process. XSLT builds upon XPath to specify which parts of the source XML document needs to be altered towards the target document. The subsequent XML code illustrates the framework of a simple XSLT style sheet.
To acquire more information and to see sample code, you may make reference to xml tutorials here.
Saturday, 14 February 2015
Presentation of XML Namespaces
An XML Namespace is the tool which can be used to identify and outline xml elements, this makes it much better to perform around various systems by having a global standard such as the “namespace”.
As much as xml is extensible, ie it could be expanded and employed in a wide range of methods, if you don't follow a set standard for the namespace you can not really implement xml without experiencing conflicts.
This is pretty self evident as you can not use various kinds of data using completely different namespaces, the format needs to be consistent in order that it can be understood and viewed through different programs and systems.
XML requirements are supervised by the W3C who usually write and control the xml specifications, additionally they specify a standard for the namespace by means of their namespace recommendations.
These types of guidelines incorporate things such as Name conflicts in XML can easily be prevented with a name prefix. So for example you have an xml file with a variety of tables, you may prevent conflicts issues by having unique prefixes for each and every table, like a a:table or b:table etc.
When making use of prefixes in XML, a so-called namespace for the prefix must be described, the namespace is defined by the xmlns attribute in the start tag of an element. The namespace declaration has the following syntax. xmlns:prefix="URI".
When a namespace is defined for an element, every child elements with the exact same prefix are linked to the same namespace. Namespaces may be declared in the elements where they are utilized or in the XML root element.
As said previously, xml is extensible, there is no semantic meaning and you may produce your own tags, having said that clearly unless you follow a recognized format or process then clashes can arise, and again having a prefix can remedy this.
The prefix unambiguously identifies the type of rating on this document. Nevertheless prefixes by themselves take care of practically nothing simply because anybody can create prefixes. Therefore, different people can create mismatched prefixes and we're back to step one: we've move the risk of conflicts from element names to prefixes. To prevent conflicts in prefixes, the prefixes must be declared.
This assertion usually follows the format of a URI, or Uniform Resource Identifier with a prefix as shown above, this is due to URI are in fact wholly unique whereas names or tags are not.
The prefix moreover, the full URI definition are certainly not interchangeable as URI’s can contain characters that are illegal in an XML namespace. It is also against the law to utilize the 3 letters XML in any event arrangement for a namespace prefix for the reason that are set aside.
Let's hope it's gone someway to provide the very idea of namespaces however I passionately advocate even more reading about this matter, a great deal of info is available on XML for many who wish to find out. For the definitive guide, visit W3.org or the W3C website.
Or for more complex readers, you'll find namespace tutorials with actual namespace examples here, http://www.liquid-technologies.com/Tutorials.aspx
As much as xml is extensible, ie it could be expanded and employed in a wide range of methods, if you don't follow a set standard for the namespace you can not really implement xml without experiencing conflicts.
This is pretty self evident as you can not use various kinds of data using completely different namespaces, the format needs to be consistent in order that it can be understood and viewed through different programs and systems.
XML requirements are supervised by the W3C who usually write and control the xml specifications, additionally they specify a standard for the namespace by means of their namespace recommendations.
These types of guidelines incorporate things such as Name conflicts in XML can easily be prevented with a name prefix. So for example you have an xml file with a variety of tables, you may prevent conflicts issues by having unique prefixes for each and every table, like a a:table or b:table etc.
When making use of prefixes in XML, a so-called namespace for the prefix must be described, the namespace is defined by the xmlns attribute in the start tag of an element. The namespace declaration has the following syntax. xmlns:prefix="URI".
When a namespace is defined for an element, every child elements with the exact same prefix are linked to the same namespace. Namespaces may be declared in the elements where they are utilized or in the XML root element.
As said previously, xml is extensible, there is no semantic meaning and you may produce your own tags, having said that clearly unless you follow a recognized format or process then clashes can arise, and again having a prefix can remedy this.
The prefix unambiguously identifies the type of rating on this document. Nevertheless prefixes by themselves take care of practically nothing simply because anybody can create prefixes. Therefore, different people can create mismatched prefixes and we're back to step one: we've move the risk of conflicts from element names to prefixes. To prevent conflicts in prefixes, the prefixes must be declared.
This assertion usually follows the format of a URI, or Uniform Resource Identifier with a prefix as shown above, this is due to URI are in fact wholly unique whereas names or tags are not.
The prefix moreover, the full URI definition are certainly not interchangeable as URI’s can contain characters that are illegal in an XML namespace. It is also against the law to utilize the 3 letters XML in any event arrangement for a namespace prefix for the reason that are set aside.
Let's hope it's gone someway to provide the very idea of namespaces however I passionately advocate even more reading about this matter, a great deal of info is available on XML for many who wish to find out. For the definitive guide, visit W3.org or the W3C website.
Or for more complex readers, you'll find namespace tutorials with actual namespace examples here, http://www.liquid-technologies.com/Tutorials.aspx
Saturday, 17 January 2015
XML DTDs Compared to XML Schema
XML is great for holding and communicating data between diverse systems along with browsers, it is completely platform independent this also makes it well suited for storing and transporting data across the internet.
By the use of an example concerning how adaptable and extremely versatile XML is, you are able to connect with web services by using say a Microsoft .net framework using a UNIX system written in C. However, in order for it to work you require a blueprint that will explain to both systems, the construction of the xml data or document, typically this is by way of some kind of schema or dtd.
The schema or dtd will probably specify the composition or layout of the xml file so that it can easily be read or parsed with the receiving system, eventually xml is a meta language so can not accomplish this specific function on it's own.
There's two main advantages to this, the first is that this means that your data will make it beyond the parsing phase as the construction has already been agreed and that helps you to get rid of any data that is not supposed to be there. The second thing is, it’s simpler for developers to understand what can be obtained as the protocol standard is documented.
About DTD, Document Type Definition
DTD is short for document type definition and as previously stated, the a means of telling other systems design and makeup of the xml file, in order for the acquiring system knows what to expect and thus it can easily interrogate the acquired xml data to verify that what is received is actually what is expected.
For example, the dtd will specify the elements which are being contained in the document and the attributes of the elements, as well as the ordering and nesting of those elements.
The dtd is called in or bundled by a development expression known as “declared”, the dtd is declared using what known as a DOCTYPE declaration beneath the XML declaration inside the xml document.
The dtd can be included inline or externally, inline as the name signifies is inside the xml document itself, in contrast to an external is outside of the xml document.
You will find advantages and drawbacks to both methods however inline is better should your documents are going to be saved and made use of offline.
About XML Schemas
Xml schemas are an advancement around the dtd method and for that reason widely thought to be a greater and a lot more potent method, in actual fact schemas also are xml files with their own DTD and do the job by referencing the XML Schema Namespace
XML Schemas supply a group of basic types, they include most basic computer programming types such as integer, byte, string and floating point numbers, but they also expand into Internet data types which include ISO country and language codes (en-GB for example).
The author of an XML Schema then uses these core types, along with various operators and modifiers, to create complex types of their own. These complex types are then used to define an element in the XML Document.
By the use of an example concerning how adaptable and extremely versatile XML is, you are able to connect with web services by using say a Microsoft .net framework using a UNIX system written in C. However, in order for it to work you require a blueprint that will explain to both systems, the construction of the xml data or document, typically this is by way of some kind of schema or dtd.
The schema or dtd will probably specify the composition or layout of the xml file so that it can easily be read or parsed with the receiving system, eventually xml is a meta language so can not accomplish this specific function on it's own.
There's two main advantages to this, the first is that this means that your data will make it beyond the parsing phase as the construction has already been agreed and that helps you to get rid of any data that is not supposed to be there. The second thing is, it’s simpler for developers to understand what can be obtained as the protocol standard is documented.
About DTD, Document Type Definition
DTD is short for document type definition and as previously stated, the a means of telling other systems design and makeup of the xml file, in order for the acquiring system knows what to expect and thus it can easily interrogate the acquired xml data to verify that what is received is actually what is expected.
For example, the dtd will specify the elements which are being contained in the document and the attributes of the elements, as well as the ordering and nesting of those elements.
The dtd is called in or bundled by a development expression known as “declared”, the dtd is declared using what known as a DOCTYPE declaration beneath the XML declaration inside the xml document.
The dtd can be included inline or externally, inline as the name signifies is inside the xml document itself, in contrast to an external is outside of the xml document.
You will find advantages and drawbacks to both methods however inline is better should your documents are going to be saved and made use of offline.
About XML Schemas
Xml schemas are an advancement around the dtd method and for that reason widely thought to be a greater and a lot more potent method, in actual fact schemas also are xml files with their own DTD and do the job by referencing the XML Schema Namespace
XML Schemas supply a group of basic types, they include most basic computer programming types such as integer, byte, string and floating point numbers, but they also expand into Internet data types which include ISO country and language codes (en-GB for example).
The author of an XML Schema then uses these core types, along with various operators and modifiers, to create complex types of their own. These complex types are then used to define an element in the XML Document.
Tuesday, 23 December 2014
The features as well as benefits of XHTML
XHTML represents Extensible HyperText Markup Language, and its in fact an evolution based upon normal HTML, it’s purpose was also intended as a path in the direction of inevitable XML migration hence the X component.
For this reason XHTML will be displayed as a hybrid of HTML and XML.
Part of the XML family of mark-up languages XHTML docs are well formed because of the mark-up rules and tag rules and so can also be parsed by XML parsers, which is in contrast to HTML which was at all times part of the Standard Generalized Markup Language (SGML).
Before examining the benefits associated with XHTML, its worth quickly explaining the intention of SGML, HTML and XML.
SGML is a language for describing markup languages, specially those employed in electronic document exchange, document management, and document publishing. HTML is an illustration of a language defined in SGML.
HTML is an SGML (Standard Generalized Markup Language) application conforming to International Standard ISO 8879. HTML is generally regarded as the common publishing vocabulary of the World Wide Web, HTML tags hold semantic meaning and are predefined.
XML is the shorthand name for EXtensible Markup Language. XML is a markup language just like HTML and was meant to identify information. XML tags usually are not predefined. You will need to define your own tags based on your needs.
In terms of syntax, it’s very much like HTML and pretty much all valid HTML elements are also valid in XHTML, however there are numerous particular points to note to ensure your HTML document is absolutely XHTML certified, these points also apply when generating new XHTML documents.
• You must compose a DOCTYPE declaration at the beginning of the XHTML document.
• You should generate all XHTML tags and attributes in lower case only.
• You have to quote every one of the attribute values.
• Attribute minimization is not allowed.
• The id attribute swaps with the name attribute.
• The language attribute of the script tag is deprecated.
So right now let’s explore the characteristics of XHTML before we look at the actual positive aspects.
Firstly, XHTML is an recognized and official W3C standard which means that all internet browsers will be compliant, and has built-in support for XHTML, this can be of serious appeal to web developers.
A valid XHTML document, mainly because it utilises XML syntax and markup, needs to have 1 of 3 DTD’s, this ensures that all the XML data comprised within the XHTML is valid and also conforms to the proper logic and type as outlined in the DTD such as adequately closed and nested xml tags.
Finally, XHTML files may also be backward suitable for non XHTML compliant internet explorer due to stricter syntax rules.
This affords the benefits that follow;
Internet pages are more inclined to render perfectly around a number of browsers such as new and old web browsers.
It's also easier to preserve, edit, convert and format your file as the need comes up, in the future.
As a result of consistent and perfectly structured format of XHTML, your online pages may be parsed and processed effortlessly.
XHTML specifies quality standard to your internet sites and if you go along with that, then your web pages are counted as quality web pages. The W3C confirms those pages using their quality seal of approval.
For this reason XHTML will be displayed as a hybrid of HTML and XML.
Part of the XML family of mark-up languages XHTML docs are well formed because of the mark-up rules and tag rules and so can also be parsed by XML parsers, which is in contrast to HTML which was at all times part of the Standard Generalized Markup Language (SGML).
Before examining the benefits associated with XHTML, its worth quickly explaining the intention of SGML, HTML and XML.
SGML is a language for describing markup languages, specially those employed in electronic document exchange, document management, and document publishing. HTML is an illustration of a language defined in SGML.
HTML is an SGML (Standard Generalized Markup Language) application conforming to International Standard ISO 8879. HTML is generally regarded as the common publishing vocabulary of the World Wide Web, HTML tags hold semantic meaning and are predefined.
XML is the shorthand name for EXtensible Markup Language. XML is a markup language just like HTML and was meant to identify information. XML tags usually are not predefined. You will need to define your own tags based on your needs.
In terms of syntax, it’s very much like HTML and pretty much all valid HTML elements are also valid in XHTML, however there are numerous particular points to note to ensure your HTML document is absolutely XHTML certified, these points also apply when generating new XHTML documents.
• You must compose a DOCTYPE declaration at the beginning of the XHTML document.
• You should generate all XHTML tags and attributes in lower case only.
• You have to quote every one of the attribute values.
• Attribute minimization is not allowed.
• The id attribute swaps with the name attribute.
• The language attribute of the script tag is deprecated.
So right now let’s explore the characteristics of XHTML before we look at the actual positive aspects.
Firstly, XHTML is an recognized and official W3C standard which means that all internet browsers will be compliant, and has built-in support for XHTML, this can be of serious appeal to web developers.
A valid XHTML document, mainly because it utilises XML syntax and markup, needs to have 1 of 3 DTD’s, this ensures that all the XML data comprised within the XHTML is valid and also conforms to the proper logic and type as outlined in the DTD such as adequately closed and nested xml tags.
Finally, XHTML files may also be backward suitable for non XHTML compliant internet explorer due to stricter syntax rules.
This affords the benefits that follow;
Internet pages are more inclined to render perfectly around a number of browsers such as new and old web browsers.
It's also easier to preserve, edit, convert and format your file as the need comes up, in the future.
As a result of consistent and perfectly structured format of XHTML, your online pages may be parsed and processed effortlessly.
XHTML specifies quality standard to your internet sites and if you go along with that, then your web pages are counted as quality web pages. The W3C confirms those pages using their quality seal of approval.
Sunday, 16 November 2014
XML DTDs Versus XML Schema
XML, short for eXtensible Markup Language, is a markup language that helps you communicate files between diverse systems, web browsers and also software without blunders or compatibility problems.
For instance, XML permits you to manage to send out data between unix along with windows type systems for example web services based upon Microsoft’s .net architecture. But it’s imperative that you stress that XML is a mark-up language rather than a programming language, so XML isn't going to by itself function commands, it's just a meta language which transmits data in a methodized file format.
Additionally the exchange to work the data has to be in a composition that's agreed by both devices ie the sender as well as the recipient, otherwise the exchange won't work as well as the recipient system will return a mistake as a result of invalid data, typically this is regarded as a parsing error.
There are a selection of ways for which you can indicate the structure of your XML data, the 2 main options are an XML Schema or a DTD file.
A DTD, Document Type Definition, is a set of markup declarations that comprise a document type for an SGML-family markup language (SGML, XML, HTML). A Document Type Definition (DTD) describes the legal constructing blocks of an XML document.
It describes the document composition with a listing of legal elements and attributes. DTD is also the original standard, outlined within the W3C's XML standard. The DTD standard is all but obsolete currently, replaced by the W3C's XSD standard.
The DTD is asserted in a DOCTYPE declaration under the XML declaration contained within an XML document:
The actual body of the DTD itself incorporates definitions concerning elements and their attributes.
One other technique is referred to as an XML Schema, that is a more robust approach to determine your xml document framework.
An XML schema definition language is generally an instrument for creating schemas. A schema really is a file suitable for denoting the structure, content and semantics related with an XML document. Many schema definition languages are available for use. The DTD (or Document Type Definition) language appeared to be quite popular with the XML community although has mainly been obsolete by XSD (or XML Schema Definition) language.
XSD is usually recommended and also conserved via the web standards body, W3C. As opposed to DTD, XSD is definitely itself coded in XML (that is why, extensible), contains support for data-types as well as namespaces and is usually far more extensive.
An XML schema describes the elements along with attributes which go into the XML doc, their data-types and default values (if any). It describes which elements are child elements, the order and also the volume of them. Moreover it identifies whether or not an element is empty or could include written text. An XML file isn't required to possess a schema declaration however, when one is supplied it will probably be utilized to validate the XML document against the above requirements.
For instance, XML permits you to manage to send out data between unix along with windows type systems for example web services based upon Microsoft’s .net architecture. But it’s imperative that you stress that XML is a mark-up language rather than a programming language, so XML isn't going to by itself function commands, it's just a meta language which transmits data in a methodized file format.
Additionally the exchange to work the data has to be in a composition that's agreed by both devices ie the sender as well as the recipient, otherwise the exchange won't work as well as the recipient system will return a mistake as a result of invalid data, typically this is regarded as a parsing error.
There are a selection of ways for which you can indicate the structure of your XML data, the 2 main options are an XML Schema or a DTD file.
A DTD, Document Type Definition, is a set of markup declarations that comprise a document type for an SGML-family markup language (SGML, XML, HTML). A Document Type Definition (DTD) describes the legal constructing blocks of an XML document.
It describes the document composition with a listing of legal elements and attributes. DTD is also the original standard, outlined within the W3C's XML standard. The DTD standard is all but obsolete currently, replaced by the W3C's XSD standard.
The DTD is asserted in a DOCTYPE declaration under the XML declaration contained within an XML document:
The actual body of the DTD itself incorporates definitions concerning elements and their attributes.
One other technique is referred to as an XML Schema, that is a more robust approach to determine your xml document framework.
An XML schema definition language is generally an instrument for creating schemas. A schema really is a file suitable for denoting the structure, content and semantics related with an XML document. Many schema definition languages are available for use. The DTD (or Document Type Definition) language appeared to be quite popular with the XML community although has mainly been obsolete by XSD (or XML Schema Definition) language.
XSD is usually recommended and also conserved via the web standards body, W3C. As opposed to DTD, XSD is definitely itself coded in XML (that is why, extensible), contains support for data-types as well as namespaces and is usually far more extensive.
An XML schema describes the elements along with attributes which go into the XML doc, their data-types and default values (if any). It describes which elements are child elements, the order and also the volume of them. Moreover it identifies whether or not an element is empty or could include written text. An XML file isn't required to possess a schema declaration however, when one is supplied it will probably be utilized to validate the XML document against the above requirements.
Saturday, 25 October 2014
XML and the future of technical writing
XML had been originally released to address some of the constraints with HTML in moving and storing data on web pages and also over the web. However as the technology grew to become more widely adopted and used, other ways to use XML emerged, due to the flexibility and versatility.
In particular, XML has flourished in publishing and in technical documents and technical writing, this is because XML tags aren't semantic as opposed to HTML tags are, this means you may produce your own tags for whatever objective you like, this really is ideal in technical writing.
So not only is XML increasingly being extensively implemented within technical writing however it looks set for being the future of technical writing as well as documentation online.
There are a variety of essential reasons over the above which are driving this particular future.
The most significant is the demand to publish once without the need to publish many times for many different devices, platforms, formats and the like. This is certainly one of XML’s key strengths since it is not fixed or tied to any platform, browser, device etc, what this means is XML is certain to be readable on nearly anything.
On top of this, you may connect CSS style sheets in your XML data to style up your documents or content any way you like, this offers a lot more flexibility for web publishers along with coders as well, which means you can actually show your content precisely how you desire it to appear across pretty much any viewing configuration ie Mac or PC, tablet or laptop, or mobile phone, or Android or Apple or IE9 or Firefox, this is certainly hugely powerful, and simply no other solution comes anywhere near delivering these kinds of compatibility and versatility.
Another factor to consider, that is tightly connected to the first, as it originates from the benefit of being able to publish just once, is the cost saving related to having the ability to just publish once. For sizeable publishers with dedicated specialists teams for print and web, the financial savings may very well be considerable.
No longer will they need to double up on employees and resources to have one team to write in print and yet another to create online on websites, the same content material can be used for both, attainable due to flexibility of XML.
Your able to use just about any plain text editor including notepad or even a specific XML editor to generate your XML files, to create XML documents for publishing you can use Adobe FrameMaker and have it set to structured mode.
Adobe describe their FrameMaker software as “ a complete solution for authoring, enriching, managing, and publishing technical documentation. Author with best-in-class XML/DITA and DTD support. Manage content using out-of-the-box integration with leading content management systems and Dropbox. Collaborate with PDF-based reviews, even on mobile devices. Easily publish to multiple channels, formats, and screens natively from within FrameMaker 12 at no extra cost, without any plug-ins.”
As superb as Adobe FrameMaker is, a dedicated XML Editor can offer superb adaptability for working with xml with superior editors offering xml schema editors and even validation for your xml and schema, this enables you to produce xml code more quickly along with minimum blunders.
In particular, XML has flourished in publishing and in technical documents and technical writing, this is because XML tags aren't semantic as opposed to HTML tags are, this means you may produce your own tags for whatever objective you like, this really is ideal in technical writing.
So not only is XML increasingly being extensively implemented within technical writing however it looks set for being the future of technical writing as well as documentation online.
There are a variety of essential reasons over the above which are driving this particular future.
The most significant is the demand to publish once without the need to publish many times for many different devices, platforms, formats and the like. This is certainly one of XML’s key strengths since it is not fixed or tied to any platform, browser, device etc, what this means is XML is certain to be readable on nearly anything.
On top of this, you may connect CSS style sheets in your XML data to style up your documents or content any way you like, this offers a lot more flexibility for web publishers along with coders as well, which means you can actually show your content precisely how you desire it to appear across pretty much any viewing configuration ie Mac or PC, tablet or laptop, or mobile phone, or Android or Apple or IE9 or Firefox, this is certainly hugely powerful, and simply no other solution comes anywhere near delivering these kinds of compatibility and versatility.
Another factor to consider, that is tightly connected to the first, as it originates from the benefit of being able to publish just once, is the cost saving related to having the ability to just publish once. For sizeable publishers with dedicated specialists teams for print and web, the financial savings may very well be considerable.
No longer will they need to double up on employees and resources to have one team to write in print and yet another to create online on websites, the same content material can be used for both, attainable due to flexibility of XML.
Your able to use just about any plain text editor including notepad or even a specific XML editor to generate your XML files, to create XML documents for publishing you can use Adobe FrameMaker and have it set to structured mode.
Adobe describe their FrameMaker software as “ a complete solution for authoring, enriching, managing, and publishing technical documentation. Author with best-in-class XML/DITA and DTD support. Manage content using out-of-the-box integration with leading content management systems and Dropbox. Collaborate with PDF-based reviews, even on mobile devices. Easily publish to multiple channels, formats, and screens natively from within FrameMaker 12 at no extra cost, without any plug-ins.”
As superb as Adobe FrameMaker is, a dedicated XML Editor can offer superb adaptability for working with xml with superior editors offering xml schema editors and even validation for your xml and schema, this enables you to produce xml code more quickly along with minimum blunders.
Wednesday, 17 September 2014
Encrypting XML Data
If you utilize xml and have xml data you need to understand that must be quite possible to have xml encrypted, actually the W3C, the body given the task of handling and also developing the xml standard have a standard for xml encryption.
The process involves encrypting an xml as well as child elements and after that swapping out the original content with the subsequent encrypted xml, whilst ensuring that the documents remains to be valid and well formed from an xml perspective.
With regards to the encryption itself, you will have three choices, symmetric encryption, a mixture of asymmetric and symmetric encryption and thirdly, X.509 Certificate encryption.
The 1st way, symmetric encryption is where you operate the same key to encrypt and decrypt the xml, the key should be stored securely and loaded during the time of use as the key is not kept with the file, care is required to be taken that the key is not jeopardized.
Accomplishing this itself involves replacing the xm content (elements) with an encrypted tag i.e. <EncryptedData>, this will likely contain the encrypted elements.
The second option, utilizing a combination symmetric and asymmetric conversion, the symmetric key is employed to encrypt the xml data while an asymmetric key is employed to encrypt the symmetric key itself. The asymmetric key works with a public and private key, a public key to encrypt the key as well as a private key to decrypt the key. Both symmetric and asymmetric keys are held and saved in the xml record itself.
Doing this itself is rather simple assuming you have a basic programming background and includes creating a CspParameters object and indicating the name of the key container then creating a symmetric key making use of the RSACryptoServiceProvider class.
The third method is make use of X.509 certificates through third party vendors for example VeriSign therefore called X.509 Certificate Encryption, the procedure works as follows.
The xml data is encrypting using two keys. A test X.509 certificate is created by using a Certificate creation tool (Makecert.exe) and this created certificate is stashed into a “certificate store”. The certificate will then be programmatically recovered and used to encrypt an XML element making use of the standard Encypt method ie <EncryptedData> element. Internally, the Encrypt method produces a separate session key and makes use of it to encrypt the XML document. This procedure encrypts the session key and saves it in addition to the encrypted XML inside of a new <EncryptedData> element.
Regardless which process you decide on, it’s imperative that you point out that your encrypted data can be held in two different methods, alternative one you are able to switch your entire element with all the encrypted clement <EncryptedData>, or alternative two only the data in the element is substituted with <EncryptedData>.
Even though on face value their may well not seem like a tremendous amount of difference between the two, nothing might be further from the truth, while using the first approach might be a costly blunder if for example you wanted to encrypt data and read the child elements later on, in such a case option 2 would be better as you may still read the attributes for example.
Whenever using xml feel free to use just about any text editor for instance notepad, nonetheless commercial and free xml editors can be found which help you to generate semantically correct xml whilst providing a great many superior benefits for the more regular xml developers. A extensive listing of xml editors can be found at http://www.xml-editor.info
The process involves encrypting an xml as well as child elements and after that swapping out the original content with the subsequent encrypted xml, whilst ensuring that the documents remains to be valid and well formed from an xml perspective.
With regards to the encryption itself, you will have three choices, symmetric encryption, a mixture of asymmetric and symmetric encryption and thirdly, X.509 Certificate encryption.
The 1st way, symmetric encryption is where you operate the same key to encrypt and decrypt the xml, the key should be stored securely and loaded during the time of use as the key is not kept with the file, care is required to be taken that the key is not jeopardized.
Accomplishing this itself involves replacing the xm content (elements) with an encrypted tag i.e. <EncryptedData>, this will likely contain the encrypted elements.
The second option, utilizing a combination symmetric and asymmetric conversion, the symmetric key is employed to encrypt the xml data while an asymmetric key is employed to encrypt the symmetric key itself. The asymmetric key works with a public and private key, a public key to encrypt the key as well as a private key to decrypt the key. Both symmetric and asymmetric keys are held and saved in the xml record itself.
Doing this itself is rather simple assuming you have a basic programming background and includes creating a CspParameters object and indicating the name of the key container then creating a symmetric key making use of the RSACryptoServiceProvider class.
The third method is make use of X.509 certificates through third party vendors for example VeriSign therefore called X.509 Certificate Encryption, the procedure works as follows.
The xml data is encrypting using two keys. A test X.509 certificate is created by using a Certificate creation tool (Makecert.exe) and this created certificate is stashed into a “certificate store”. The certificate will then be programmatically recovered and used to encrypt an XML element making use of the standard Encypt method ie <EncryptedData> element. Internally, the Encrypt method produces a separate session key and makes use of it to encrypt the XML document. This procedure encrypts the session key and saves it in addition to the encrypted XML inside of a new <EncryptedData> element.
Regardless which process you decide on, it’s imperative that you point out that your encrypted data can be held in two different methods, alternative one you are able to switch your entire element with all the encrypted clement <EncryptedData>, or alternative two only the data in the element is substituted with <EncryptedData>.
Even though on face value their may well not seem like a tremendous amount of difference between the two, nothing might be further from the truth, while using the first approach might be a costly blunder if for example you wanted to encrypt data and read the child elements later on, in such a case option 2 would be better as you may still read the attributes for example.
Whenever using xml feel free to use just about any text editor for instance notepad, nonetheless commercial and free xml editors can be found which help you to generate semantically correct xml whilst providing a great many superior benefits for the more regular xml developers. A extensive listing of xml editors can be found at http://www.xml-editor.info
Sunday, 17 August 2014
Using XML with DOM, Good and bad points
XML is actually a meta markup language containing its own set of tags, permitting richly arranged documents to be transmitted and presented over the web. Just before this web developers had the usage of HTML and SGML to showcase website content on the internet, however both SGML and HTML had a variety of constraints which made them inappropriate and in reality limited with regards to lots of the then promising technologies and calls for of the net, like displaying rich and dynamic data.
XML is a bit more suitable simply because its much more accommodating than HTML or SGML, hence the X, which symbolizes Extensible, for this reason XML is needed for displaying rich data since its more suitable than its nearest alternatives.
In fact XML contains a number of advantages for web designers and developers alike, these kinds of positive aspects include firstly and most clear of all, content owners can produce their own custom docs a result of the flexibility of being able to make custom tags. XML tags do not carry semantic meaning so programmers can create their own tags. This isn’t likely with XML or SGML.
Secondly, the other big advantage, as mentioned already, is the fact content like hyperlinks can be displayed in a much richer format due to the sophisticated features and functionality of XML in comparison with HTML.
XML offers much more superior facilities in the manner content is presented in web browsers not to mention terrific developments in functionality in particular in relation to dynamic content.
The main reason for this boils down to compression powers, XML is organized very well which makes it quite simple to compress, this amount of order and structure just isn't present in ordinary text and so XML offers a faster browsing experience.
Together with the good points already mentioned, its also correct to mention several of the disadvantages of XML, which although not substantial, its vital that you mention for sake of completeness.
The most obvious and well known of such weaknesses is that XML could be rather large and verbose from a programming viewpoint, and that's why in the subject of web services JSON is becoming incredibly popular to the detriment of XML.
However this doesn't have to be a major issue, it all depends on what you intend to employ XML and ways in which you want to work with it. Another point to note is that there exists nonetheless a lot of disparity in terms of criteria and interoperability etc. Because of the many different technologies and also the rapidly changing nature of XML there are still gaps between XML related technologies including XSL and XSLT.
In relation to working with DOM. Microsoft have provided an MSXML parser which lets you load and parse your XML files, this takes a lot of the pain away from working with XML. The parser functions by showing your XML file as a DOM (Document Object Model), this lets you gather specifics of the xml file, to govern it also to navigate through the file, elements, attributes etc.
To summarize, there are a number of strengths and weaknesses to XML and employing DOM parsers is a fantastic way to parse XML files, you can also use XML tools, which save you time whenever using XML.
XML is a bit more suitable simply because its much more accommodating than HTML or SGML, hence the X, which symbolizes Extensible, for this reason XML is needed for displaying rich data since its more suitable than its nearest alternatives.
In fact XML contains a number of advantages for web designers and developers alike, these kinds of positive aspects include firstly and most clear of all, content owners can produce their own custom docs a result of the flexibility of being able to make custom tags. XML tags do not carry semantic meaning so programmers can create their own tags. This isn’t likely with XML or SGML.
Secondly, the other big advantage, as mentioned already, is the fact content like hyperlinks can be displayed in a much richer format due to the sophisticated features and functionality of XML in comparison with HTML.
XML offers much more superior facilities in the manner content is presented in web browsers not to mention terrific developments in functionality in particular in relation to dynamic content.
The main reason for this boils down to compression powers, XML is organized very well which makes it quite simple to compress, this amount of order and structure just isn't present in ordinary text and so XML offers a faster browsing experience.
Together with the good points already mentioned, its also correct to mention several of the disadvantages of XML, which although not substantial, its vital that you mention for sake of completeness.
The most obvious and well known of such weaknesses is that XML could be rather large and verbose from a programming viewpoint, and that's why in the subject of web services JSON is becoming incredibly popular to the detriment of XML.
However this doesn't have to be a major issue, it all depends on what you intend to employ XML and ways in which you want to work with it. Another point to note is that there exists nonetheless a lot of disparity in terms of criteria and interoperability etc. Because of the many different technologies and also the rapidly changing nature of XML there are still gaps between XML related technologies including XSL and XSLT.
In relation to working with DOM. Microsoft have provided an MSXML parser which lets you load and parse your XML files, this takes a lot of the pain away from working with XML. The parser functions by showing your XML file as a DOM (Document Object Model), this lets you gather specifics of the xml file, to govern it also to navigate through the file, elements, attributes etc.
To summarize, there are a number of strengths and weaknesses to XML and employing DOM parsers is a fantastic way to parse XML files, you can also use XML tools, which save you time whenever using XML.
Friday, 18 July 2014
Making use of XML, XSLT and also ASP
XML is a markup language which was initially considered by a group of programmers working for IBM back in the 1980’s, however back then it had been known as SGML, later as the digital era began it evolved into XML.
The goal of XML was to allow for documents and data to be transported over the internet and available, to do this and much more, programmers realised that much more functionality was needed.
What was required was the capacity to transform XML documents into different outputs like HTML, PDF etc, so that it could offer more functionality and flexibility than it could possibly deliver back then.
The programmers were acutely aware that applications which could work with XML would ultimately also need to display or structure that information or data in different formats that could not be specified in the XML document itself.
The thing that was called for was a answer that might accept the XML data and change it into other formats, like HTML as well as further developments into other forms of XML so that it may very well be applied to any platform or with any other programming language.
The builders developed a method called XSLT (Extensible Stylesheet Language Transformation), XSLT has been widely successful permitting non XML related technologies such as ASP, HTML and a lot more to work with XML language.
With the web getting increasingly mobile and cross device, it has enabled XML to be utilized by a wide range of devices across various platforms and browsers, and from mobiles, to laptops, to tablets to PC’s and more.
There's also additional benefits, by way of example with XSLT, you can now also transform the structure of XML documents, that is ideal when the data will not fit with the applications data structure requirement, with XSLT you simply transform the structure of the XML document to correspond with the requirement of the application.
So how does XSLT work what is the process for changing XML documents? Well you'll find two primary pieces, the first component is that you must parse your xml file, using a parsing engine.
Parsing is where the XML document is loaded into a tree structure. The second element is where the tree structure will be further optimised for XSLT processing and is influenced by the processor type, ie whether it’s a SAX or DOM processor.
It’s also important to observe that in order to process XML files, XSLT relies on templates so that it may make specific structures, on this matter, the W3C states;
A stylesheet contains a set of template rules. A template rule has two parts: a pattern which is matched against nodes in the source tree and a template which can be instantiated to form part of the result tree. This allows a stylesheet to be applicable to a wide class of documents that have similar source tree structures.
The benefit of making use of templates is the fact its adaptable and also efficient and also a excellent means of processing different XML structures. There certainly are a wide variety of free and commercial xml tools that can also process your xml files that also feature built-in SAX or DOM processors and can accomplish XSLT transformations.
The goal of XML was to allow for documents and data to be transported over the internet and available, to do this and much more, programmers realised that much more functionality was needed.
What was required was the capacity to transform XML documents into different outputs like HTML, PDF etc, so that it could offer more functionality and flexibility than it could possibly deliver back then.
The programmers were acutely aware that applications which could work with XML would ultimately also need to display or structure that information or data in different formats that could not be specified in the XML document itself.
The thing that was called for was a answer that might accept the XML data and change it into other formats, like HTML as well as further developments into other forms of XML so that it may very well be applied to any platform or with any other programming language.
The builders developed a method called XSLT (Extensible Stylesheet Language Transformation), XSLT has been widely successful permitting non XML related technologies such as ASP, HTML and a lot more to work with XML language.
With the web getting increasingly mobile and cross device, it has enabled XML to be utilized by a wide range of devices across various platforms and browsers, and from mobiles, to laptops, to tablets to PC’s and more.
There's also additional benefits, by way of example with XSLT, you can now also transform the structure of XML documents, that is ideal when the data will not fit with the applications data structure requirement, with XSLT you simply transform the structure of the XML document to correspond with the requirement of the application.
So how does XSLT work what is the process for changing XML documents? Well you'll find two primary pieces, the first component is that you must parse your xml file, using a parsing engine.
Parsing is where the XML document is loaded into a tree structure. The second element is where the tree structure will be further optimised for XSLT processing and is influenced by the processor type, ie whether it’s a SAX or DOM processor.
It’s also important to observe that in order to process XML files, XSLT relies on templates so that it may make specific structures, on this matter, the W3C states;
A stylesheet contains a set of template rules. A template rule has two parts: a pattern which is matched against nodes in the source tree and a template which can be instantiated to form part of the result tree. This allows a stylesheet to be applicable to a wide class of documents that have similar source tree structures.
The benefit of making use of templates is the fact its adaptable and also efficient and also a excellent means of processing different XML structures. There certainly are a wide variety of free and commercial xml tools that can also process your xml files that also feature built-in SAX or DOM processors and can accomplish XSLT transformations.
Sunday, 29 June 2014
A look at o:XML
XML is an excellent means for transmitting data through numerous platforms and systems and is widely used widely in web applications which includes in web services and many others. Nevertheless it has failed to have as considerable an effect in programming than it has in internet technologies.
o:XML is a more recent venture which aims to overcome that lack of achievement by featuring extended programming abilities without the ordinary verbose code that would be created by utilizing XML.
It’s also important to understand that XML is purely a mark-up language and for that reason in itself XML can't be used to write programs or software since it cannot issue instructions or perform as an executable file etc.
Furthermore XML tags carry absolutely no semantic meaning as tags can be done by the writer without following any protocols or rules, whereas proper programming languages have precise meaning and rules in the use o their tags.
As an example, in case you wanted a static block, in Java you'd probably write; class StaticBlock, however xml tags can be anything you would like them to be as you write your own tags.
o:XML looks rather promising and could one day make it very easy to code XML applications by providing precisely the same benefits for programming that XML offers for representing data.
o:XML is far more flexible, much less verbose and also has exception handling, namespaces, threads, regular expressions and a whole bunch of really useful programming abilities, some have even compared it to a mix of Python and XML.
o:XML is what's known as object oriented, which means that basically everything is an object and every object has a type, types are String, Element, Document and so on. You could also construct your own types and functions
Just like you can invoke function on nodes and node sets in languages like Java and C , it's easy to likewise do the same with o:XML, actually you utilize o:Path to find and select nodes and even to change them.
This is hugely invaluable as you're able basically put the strength of XML to optimum use including the tools and technologies which have been produced as a result of XML. In addition you have the added benefit that your code will work seamlessly with just about every other XML vocabulary.
In short o:XML is really functional and easy to work with, because of this it is developed to take care of most problems in a practical way, in fact in contrast to most other technologies, it actually provides far better, much simpler and swifter solutions for nearly the majority of software.
Which is not to suggest that XML is likely to be obsolete anytime soon, it's still a crucial and versatile solution for transporting data on the web and in ensuring cross browser compatibility of websites and web pages.
o:XML is a more recent venture which aims to overcome that lack of achievement by featuring extended programming abilities without the ordinary verbose code that would be created by utilizing XML.
It’s also important to understand that XML is purely a mark-up language and for that reason in itself XML can't be used to write programs or software since it cannot issue instructions or perform as an executable file etc.
Furthermore XML tags carry absolutely no semantic meaning as tags can be done by the writer without following any protocols or rules, whereas proper programming languages have precise meaning and rules in the use o their tags.
As an example, in case you wanted a static block, in Java you'd probably write; class StaticBlock, however xml tags can be anything you would like them to be as you write your own tags.
o:XML looks rather promising and could one day make it very easy to code XML applications by providing precisely the same benefits for programming that XML offers for representing data.
o:XML is far more flexible, much less verbose and also has exception handling, namespaces, threads, regular expressions and a whole bunch of really useful programming abilities, some have even compared it to a mix of Python and XML.
o:XML is what's known as object oriented, which means that basically everything is an object and every object has a type, types are String, Element, Document and so on. You could also construct your own types and functions
Just like you can invoke function on nodes and node sets in languages like Java and C , it's easy to likewise do the same with o:XML, actually you utilize o:Path to find and select nodes and even to change them.
This is hugely invaluable as you're able basically put the strength of XML to optimum use including the tools and technologies which have been produced as a result of XML. In addition you have the added benefit that your code will work seamlessly with just about every other XML vocabulary.
In short o:XML is really functional and easy to work with, because of this it is developed to take care of most problems in a practical way, in fact in contrast to most other technologies, it actually provides far better, much simpler and swifter solutions for nearly the majority of software.
Which is not to suggest that XML is likely to be obsolete anytime soon, it's still a crucial and versatile solution for transporting data on the web and in ensuring cross browser compatibility of websites and web pages.
Friday, 23 May 2014
Working with SOAP in XML
SOAP means Simple Object Access Protocol, its goal is to encourage the exchange of structured information in the use of Web services software. To perform this SOAP relies upon XML for its message style and on Hypertext Markup Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP) for its transmission.
In short SOAP is amazingly handy and necessary for application development, permitting internet communication in between programs.
One way that it does this over HTTP is to employ Remote Procedure calls (RPCs), this makes it much simpler and simpler for applications to employ network protocols including opening and closing sockets, formatting requests, listening on ports and decoding responses and a lot more. To make this happen, you simply write a basic procedure call.
It’s also useful over making use of middleware due to the extra difficulties of utilizing middleware for example trying to get passed firewalls which are generally set to block non HTTP traffic.
Its also reasonably inadequate in regards to deployment, for this reason you are going to actually find it easier and quicker to deploy a website than a middleware dependent application.
For these points plus more, designers prefer to utilize SOAP given that it overcomes the middleware issues and it in addition has the equivalent features as an RPC.
Its also important to notice that SOAP has evolved together with the world wide web and human activity in terms of how that data is absorbed over the internet, as an example from the outset the net was about information consumption and therefore internet sites were being organized tomeet this particular need, today their is more interactive engagement with a lot more apps staying utilized as a consequence more websites being created to service software rather then humans. RSS is a fantastic example of working with XML to develop rrnternet sites for software rather than for humans.
A large number of pages are now constructed using XML so it is ever more essential that programs and information data is organised to work with XML.
The subsequent evolution was from XML to XML-RPC, which generally enabled developers to connect two formerly unrelated fields, it varies from RPC in that it employs an XML and HTTP protocol to carry a request on the network, rather than binary protocol of RPC.
One of the very first such implementations is most likely XML-RPC. At a bird's-eye view, XML-RPC is similar to usual RPC, nonetheless the binary protocol employed to carry the request on the network happens to be substituted with XML and HTTP. XML-RPC also supports arrays and structures (also called records) through the array and struct elements.
Last but not least, through the evolution of RPC and XML-RPC we arrived at SOAP, as a consequence of countless defects of the methods, a new protocol was required to transfer data to web applications.
After considerable collaboration between IBM and XML RPC developers, the protocol was enhanced and upgraded to SOAP, this new protocol is quite potent and it likewise broadens the field to cover applications aren't adequately labeled as remote procedure calls.
If you are considering making use of XML and SOAP, you may also use development tools such as Liquid XML Studio to produce your code, this has an added advantage of being able to make use of extensive libraries together with code validation, ideal when you expect to write hundreds or thousands of lines of code.
In short SOAP is amazingly handy and necessary for application development, permitting internet communication in between programs.
One way that it does this over HTTP is to employ Remote Procedure calls (RPCs), this makes it much simpler and simpler for applications to employ network protocols including opening and closing sockets, formatting requests, listening on ports and decoding responses and a lot more. To make this happen, you simply write a basic procedure call.
It’s also useful over making use of middleware due to the extra difficulties of utilizing middleware for example trying to get passed firewalls which are generally set to block non HTTP traffic.
Its also reasonably inadequate in regards to deployment, for this reason you are going to actually find it easier and quicker to deploy a website than a middleware dependent application.
For these points plus more, designers prefer to utilize SOAP given that it overcomes the middleware issues and it in addition has the equivalent features as an RPC.
Its also important to notice that SOAP has evolved together with the world wide web and human activity in terms of how that data is absorbed over the internet, as an example from the outset the net was about information consumption and therefore internet sites were being organized tomeet this particular need, today their is more interactive engagement with a lot more apps staying utilized as a consequence more websites being created to service software rather then humans. RSS is a fantastic example of working with XML to develop rrnternet sites for software rather than for humans.
A large number of pages are now constructed using XML so it is ever more essential that programs and information data is organised to work with XML.
The subsequent evolution was from XML to XML-RPC, which generally enabled developers to connect two formerly unrelated fields, it varies from RPC in that it employs an XML and HTTP protocol to carry a request on the network, rather than binary protocol of RPC.
One of the very first such implementations is most likely XML-RPC. At a bird's-eye view, XML-RPC is similar to usual RPC, nonetheless the binary protocol employed to carry the request on the network happens to be substituted with XML and HTTP. XML-RPC also supports arrays and structures (also called records) through the array and struct elements.
Last but not least, through the evolution of RPC and XML-RPC we arrived at SOAP, as a consequence of countless defects of the methods, a new protocol was required to transfer data to web applications.
After considerable collaboration between IBM and XML RPC developers, the protocol was enhanced and upgraded to SOAP, this new protocol is quite potent and it likewise broadens the field to cover applications aren't adequately labeled as remote procedure calls.
If you are considering making use of XML and SOAP, you may also use development tools such as Liquid XML Studio to produce your code, this has an added advantage of being able to make use of extensive libraries together with code validation, ideal when you expect to write hundreds or thousands of lines of code.
Sunday, 13 April 2014
The main building blocks of XML
XML is a mark-up language, it will be much like HTML in that contents are included within a group of opening and closing tags. However XML is different from HTML in one important aspect, XML tags do not possess semantic meaning, in XML you could develop your own tags, in HTML you can just use valid HTML tags.
The very first building block of xml we will examine are elements, a typical xml file will contain a lot of elements, usually plenty of tags with each tag made up of bits of data.
For example, let’s say we have an xml file of products, this will comprise of supplier codes, price, description, colour etc. The colour could well be shown as follows in an xml file;
<colour> red</colour>
Both the tags above are the start and end tags, with the end tag made up of a "/" which indicates close of the tag.
Taken together with the start and end tag and the contents in-between, this is an element.
Elements are also referred to by their name or type, in this situation the element above is a name element or type.
It's advisable to stick to some simple rules and also guidelines on naming your elements, primary rule is always that names need to be descriptive as well as indicative of the subject matter within the element, this will give your xml field substance and make it easy for other people to follow and fully understand.
As an example, an element that contains serial numbers can be more appropriately named “serial numbers” rather then “numbers” or “56879” which has no meaning to anybody.
Additionally, there are a number of critical naming conventions that you must follow, valid names ought to begin with a letter or one of a few punctuation characters, followed by letters, digits, hyphens, underscores, or colons.
Be aware also that xml is case sensitive although as yet you won't notice any formal conventions on the way you should utilize uppercase, lower case or even mixed case characters.
Text can be divided into markup data and character data. Character data is the information kept in the document and markup data is the tags and syntax.
XML recognises any valid Unicode characters including all the 26 letters of the alphabet and 0-9 digits, and in addition all of the 33 characters of the Cyrillic alphabet.
You can read and process xml data with special software often known as an xml parser, the xml parser operates by parsing each character in order to create a representation of that data, the parsed data is known as PCDATA.
If you wish to detour around certain data i.e. you do not want it to be parser by the software, you can certainly accomplish that by using a CDATA section, the parser will likely then disregard any data comprised within a CDATA section.
The subsequent block we are going to take a look at is referred to as an attribute, they work well for associating name/value pairs with elements, as an illustration in an element concerning name, an attribute might be first and last name.
Attributes can be one of three different types: strings, tokenized types, or enumerations.
The very first building block of xml we will examine are elements, a typical xml file will contain a lot of elements, usually plenty of tags with each tag made up of bits of data.
For example, let’s say we have an xml file of products, this will comprise of supplier codes, price, description, colour etc. The colour could well be shown as follows in an xml file;
<colour> red</colour>
Both the tags above are the start and end tags, with the end tag made up of a "/" which indicates close of the tag.
Taken together with the start and end tag and the contents in-between, this is an element.
Elements are also referred to by their name or type, in this situation the element above is a name element or type.
It's advisable to stick to some simple rules and also guidelines on naming your elements, primary rule is always that names need to be descriptive as well as indicative of the subject matter within the element, this will give your xml field substance and make it easy for other people to follow and fully understand.
As an example, an element that contains serial numbers can be more appropriately named “serial numbers” rather then “numbers” or “56879” which has no meaning to anybody.
Additionally, there are a number of critical naming conventions that you must follow, valid names ought to begin with a letter or one of a few punctuation characters, followed by letters, digits, hyphens, underscores, or colons.
Be aware also that xml is case sensitive although as yet you won't notice any formal conventions on the way you should utilize uppercase, lower case or even mixed case characters.
Text can be divided into markup data and character data. Character data is the information kept in the document and markup data is the tags and syntax.
XML recognises any valid Unicode characters including all the 26 letters of the alphabet and 0-9 digits, and in addition all of the 33 characters of the Cyrillic alphabet.
You can read and process xml data with special software often known as an xml parser, the xml parser operates by parsing each character in order to create a representation of that data, the parsed data is known as PCDATA.
If you wish to detour around certain data i.e. you do not want it to be parser by the software, you can certainly accomplish that by using a CDATA section, the parser will likely then disregard any data comprised within a CDATA section.
The subsequent block we are going to take a look at is referred to as an attribute, they work well for associating name/value pairs with elements, as an illustration in an element concerning name, an attribute might be first and last name.
Attributes can be one of three different types: strings, tokenized types, or enumerations.
Saturday, 15 March 2014
XML and DataSet Objects
This article will definitely examine DataSet objects and in what ways XML is employed when working with DataSets. Let’s begin with looking at precisely what a DataSet is.
A DataSet is essentially an in-memory depiction of data, because the data itself can be kept to memory, it may be adjusted also it can be written back to the data source. Additionally it may comprise one or more DataTable objects.
The DataTable objects themselves could have rows and columns, called DataRows and DataColumns or perhaps a primary key, foreign key, and constraint and additionally relation information concerning the data in the DataTable objects.
The DataTable object symbolizes every table inside of a DataSet; and as a result the DataColumn object every single column within a DataTable and the DataRow object every row within the DataTable.
It is additionally important to consider that the DataSet would not validate the XML data against the schema; it simply uses it to infer the structure needed for the tables in the DataSet. The System.Data.DataSet class is provided to support DataSet in .NET.
What’s the DataSet Class in .Net?
The DataSet class in .NET is a fairly handy .Net aspect that allows you to build applications and store data in an XML file instead of having to hold and recover it from a database.
This can be done thanks to the considerable XML support showcased in the DataSet class for reading and writing data as XML, this can include the following techniques which I will explain in greater detail, GetXml Method, GetXmlSchema Method, InferXmlSchema Method, WriteXml Method, WriteXmlSchema Method, ReadXml Method, ReadXmlSchema Method.
So let’s examine each one of these approaches in a little more depth, I will show you the most suitable syntax as well.
The GetXml Method
This approach returns a string containing an XML representation of the actual data which is saved in the DataSet, the format is public string GetXml();
The GetXmlSchema Method
This method returns the schema for an XML expression of the information saved in the DataSet, it delivers the XML as a string so its a lot more verbose than the WriteXmlSchema approach to write XML to a file. The syntax is public string GetXmlSchema();
InferXmlSchema Method
This procedure can be applied XML schema to the DataSet by taking an XML document provided in a TextReader, XmlReader, Stream object or a particular hard disk drive file. The syntax is;
public void InferXmlSchema(string,string[]);
public void InferXmlSchema(TextReader,string[]);
public void InferXmlSchema(Stream,Stream[]);
public void InferXmlSchema(XmlReader,string[]);
WriteXml Method
This approach writes the XML illustration of the data in the DataSet object to a TextWriter object, an XmlWriter object, a Stream object or instantly to a specified disk file. The syntax is;
public void WriteXml(string);
public void WriteXml(TextWriter);
public void WriteXml(Stream);
public void WriteXml(XmlWriter);
WriteXmlSchema Method
This process creates the XML schema of the DataSet to a TextWriter object, an XmlWriter object, a Stream object or right to a specified hard disk drive file. The syntax is;
public void WriteXmlSchema(string);
public void WriteXmlSchema(TextWriter);
public void WriteXmlSchema(Stream);
public void WriteXmlSchema(XmlWriter);
ReadXml Method
This method scans the XML data (including a schema when present) into the DataSet from a TextReader, XmlReader, Stream object or straight to a specific hard drive file. The syntax is;
public void ReadXml(string);
public void ReadXml(TextReader);
public void ReadXml(Stream);
public void ReadXml(XmlReader);
ReadXmlSchema Method
This technique deciphers the XML schema explaining the contents of the DataSet to a TextReader, XmlReader, and Stream object or right to a specified hard disk drive file. The syntax is;
public void ReadXmlSchema(string);
public void ReadXmlSchema(TextReader);
public void ReadXmlSchema(Stream);
public void ReadXmlSchema(XmlReader);
Make sure that you bear mind that the preceding methods with DataSet will be more designed for working with small amounts of data a result of quantity of memory that is required, working copious amounts of information this may soon engulf just about any large software.
A DataSet is essentially an in-memory depiction of data, because the data itself can be kept to memory, it may be adjusted also it can be written back to the data source. Additionally it may comprise one or more DataTable objects.
The DataTable objects themselves could have rows and columns, called DataRows and DataColumns or perhaps a primary key, foreign key, and constraint and additionally relation information concerning the data in the DataTable objects.
The DataTable object symbolizes every table inside of a DataSet; and as a result the DataColumn object every single column within a DataTable and the DataRow object every row within the DataTable.
It is additionally important to consider that the DataSet would not validate the XML data against the schema; it simply uses it to infer the structure needed for the tables in the DataSet. The System.Data.DataSet class is provided to support DataSet in .NET.
What’s the DataSet Class in .Net?
The DataSet class in .NET is a fairly handy .Net aspect that allows you to build applications and store data in an XML file instead of having to hold and recover it from a database.
This can be done thanks to the considerable XML support showcased in the DataSet class for reading and writing data as XML, this can include the following techniques which I will explain in greater detail, GetXml Method, GetXmlSchema Method, InferXmlSchema Method, WriteXml Method, WriteXmlSchema Method, ReadXml Method, ReadXmlSchema Method.
So let’s examine each one of these approaches in a little more depth, I will show you the most suitable syntax as well.
The GetXml Method
This approach returns a string containing an XML representation of the actual data which is saved in the DataSet, the format is public string GetXml();
The GetXmlSchema Method
This method returns the schema for an XML expression of the information saved in the DataSet, it delivers the XML as a string so its a lot more verbose than the WriteXmlSchema approach to write XML to a file. The syntax is public string GetXmlSchema();
InferXmlSchema Method
This procedure can be applied XML schema to the DataSet by taking an XML document provided in a TextReader, XmlReader, Stream object or a particular hard disk drive file. The syntax is;
public void InferXmlSchema(string,string[]);
public void InferXmlSchema(TextReader,string[]);
public void InferXmlSchema(Stream,Stream[]);
public void InferXmlSchema(XmlReader,string[]);
WriteXml Method
This approach writes the XML illustration of the data in the DataSet object to a TextWriter object, an XmlWriter object, a Stream object or instantly to a specified disk file. The syntax is;
public void WriteXml(string);
public void WriteXml(TextWriter);
public void WriteXml(Stream);
public void WriteXml(XmlWriter);
WriteXmlSchema Method
This process creates the XML schema of the DataSet to a TextWriter object, an XmlWriter object, a Stream object or right to a specified hard disk drive file. The syntax is;
public void WriteXmlSchema(string);
public void WriteXmlSchema(TextWriter);
public void WriteXmlSchema(Stream);
public void WriteXmlSchema(XmlWriter);
ReadXml Method
This method scans the XML data (including a schema when present) into the DataSet from a TextReader, XmlReader, Stream object or straight to a specific hard drive file. The syntax is;
public void ReadXml(string);
public void ReadXml(TextReader);
public void ReadXml(Stream);
public void ReadXml(XmlReader);
ReadXmlSchema Method
This technique deciphers the XML schema explaining the contents of the DataSet to a TextReader, XmlReader, and Stream object or right to a specified hard disk drive file. The syntax is;
public void ReadXmlSchema(string);
public void ReadXmlSchema(TextReader);
public void ReadXmlSchema(Stream);
public void ReadXmlSchema(XmlReader);
Make sure that you bear mind that the preceding methods with DataSet will be more designed for working with small amounts of data a result of quantity of memory that is required, working copious amounts of information this may soon engulf just about any large software.
Sunday, 16 February 2014
XML and DataSet items
This article will have a look at DataSet objects and how XML can be used while running with datasets. Let's start by exploring what a dataSet is.
A dataSet is effectively an in-memory illustration of information, for the reason that data itself can be stored to memory, it may be changed and it can be written back to the data supply.
It may possibly additionally include a number of datatable items. The DataTable items themselves may have rows and columns, recognized as dataRows and dataColumns as well as a primary key, foreign key, and constraint and also relation information about the knowledge within the informationtable items.
The datatable item represents every table inside a dataSet; and as a result the dataColumn object every column within a datatable and the dataRow item every row within a datatable.
It is usually vital to understand that the DataSet does not validate the XML data against the schema; it simply uses it to infer the construction required for the tables within the DataSet. The utility data.DataSet magnificence is equipped to strengthen dataSet in .NET.
What’s the DataSet class in .Net?
The dataSet class in .net is a rather useful .net feature that allows you to construct programs and store data in an XML report fairly than having to store retrieve it from a knowledgebase.
So let’s take a look at each of those methods in a little more detail, i will be able to show you the right kind of syntax as well.
The GetXml Method
This means returns a string that accommodates an XML illustration of the particular data that is saved in the DataSet, the syntax is public string GetXml();
The GetXmlSchema Method
This method returns the schema for an XML representation of the data stored in the DataSet, it returns the XML as a string so its more verbose than the WriteXmlSchema method to write XML to a file. The syntax is public string GetXmlSchema();
InferXmlSchema Method
This method applies XML schema to the DataSet by means of taking an XML file supplied in a TextReader, XmlReader, flow item or a unique disk file. The syntax is;
public void InferXmlSchema(string,string[]);
public void InferXmlSchema(TextReader,string[]);
public void InferXmlSchema(Stream,Stream[]);
public void InferXmlSchema(XmlReader,string[]);
WriteXml Method
This method writes the XML representation of the data in the DataSet object to a TextWriter object, an XmlWriter object, a Stream object or directly to a specified disk file. The syntax is;
public void WriteXml(string);
public void WriteXml(TextWriter);
public void WriteXml(Stream);
public void WriteXml(XmlWriter);
WriteXmlSchema Method
This manner writes the XML schema of the DataSet to a TextWriter item, an XmlWriter object, a move item or instantly to a unique disk document. The syntax is;
public void WriteXmlSchema(string);
public void WriteXmlSchema(TextWriter);
public void WriteXmlSchema(Stream);
public void WriteXmlSchema(XmlWriter);
ReadXml Method
This manner reads the XML information (including a schema when present) into the DataSet from a TextReader, XmlReader, move object or directly to a certaindisk file. The syntax is;
public void ReadXml(string);
public void ReadXml(TextReader);
public void ReadXml(Stream);
public void ReadXml(XmlReader);
ReadXmlSchema Method
This means reads the XML schema describing the contents of the DataSet to a TextReader, XmlReader, and stream item or right away to a particular disk document. The syntax is;
public void ReadXmlSchema(string);
public void ReadXmlSchema(TextReader);
public void ReadXmlSchema(Stream);
public void ReadXmlSchema(XmlReader);
You should also endure mind that the above methods with DataSet are more suited for running with small quantities of information on account of the amount of memory that may be required, operating quite a lot of knowledge this will likely quickly weigh down any huge utility.
A dataSet is effectively an in-memory illustration of information, for the reason that data itself can be stored to memory, it may be changed and it can be written back to the data supply.
It may possibly additionally include a number of datatable items. The DataTable items themselves may have rows and columns, recognized as dataRows and dataColumns as well as a primary key, foreign key, and constraint and also relation information about the knowledge within the informationtable items.
The datatable item represents every table inside a dataSet; and as a result the dataColumn object every column within a datatable and the dataRow item every row within a datatable.
It is usually vital to understand that the DataSet does not validate the XML data against the schema; it simply uses it to infer the construction required for the tables within the DataSet. The utility data.DataSet magnificence is equipped to strengthen dataSet in .NET.
What’s the DataSet class in .Net?
The dataSet class in .net is a rather useful .net feature that allows you to construct programs and store data in an XML report fairly than having to store retrieve it from a knowledgebase.
This is possible thanks to the extensive XML support
featured in the DataSet class for reading and writing data as XML, this
includes the following methods which I will explain in detail, GetXml Method, GetXmlSchema Method, InferXmlSchema Method, WriteXml
Method, WriteXmlSchema Method, ReadXml Method, ReadXmlSchema Method.
So let’s take a look at each of those methods in a little more detail, i will be able to show you the right kind of syntax as well.
The GetXml Method
This means returns a string that accommodates an XML illustration of the particular data that is saved in the DataSet, the syntax is public string GetXml();
The GetXmlSchema Method
This method returns the schema for an XML representation of the data stored in the DataSet, it returns the XML as a string so its more verbose than the WriteXmlSchema method to write XML to a file. The syntax is public string GetXmlSchema();
InferXmlSchema Method
This method applies XML schema to the DataSet by means of taking an XML file supplied in a TextReader, XmlReader, flow item or a unique disk file. The syntax is;
public void InferXmlSchema(string,string[]);
public void InferXmlSchema(TextReader,string[]);
public void InferXmlSchema(Stream,Stream[]);
public void InferXmlSchema(XmlReader,string[]);
WriteXml Method
This method writes the XML representation of the data in the DataSet object to a TextWriter object, an XmlWriter object, a Stream object or directly to a specified disk file. The syntax is;
public void WriteXml(string);
public void WriteXml(TextWriter);
public void WriteXml(Stream);
public void WriteXml(XmlWriter);
WriteXmlSchema Method
This manner writes the XML schema of the DataSet to a TextWriter item, an XmlWriter object, a move item or instantly to a unique disk document. The syntax is;
public void WriteXmlSchema(string);
public void WriteXmlSchema(TextWriter);
public void WriteXmlSchema(Stream);
public void WriteXmlSchema(XmlWriter);
ReadXml Method
This manner reads the XML information (including a schema when present) into the DataSet from a TextReader, XmlReader, move object or directly to a certaindisk file. The syntax is;
public void ReadXml(string);
public void ReadXml(TextReader);
public void ReadXml(Stream);
public void ReadXml(XmlReader);
ReadXmlSchema Method
This means reads the XML schema describing the contents of the DataSet to a TextReader, XmlReader, and stream item or right away to a particular disk document. The syntax is;
public void ReadXmlSchema(string);
public void ReadXmlSchema(TextReader);
public void ReadXmlSchema(Stream);
public void ReadXmlSchema(XmlReader);
You should also endure mind that the above methods with DataSet are more suited for running with small quantities of information on account of the amount of memory that may be required, operating quite a lot of knowledge this will likely quickly weigh down any huge utility.
Tuesday, 12 March 2013
Generating XML Schemas and The Benefit of Schema Editors
An xml schema is a data file that's intended to explain the contents of an xml document as well as dictate and lay down rules to what can and cannot be contained in the xml file. These constraints are not just restricted to syntactical rules but can also specify what elements should be included, the order of these elements and child elements and so on.
Normally, an XSDL or XML Schema Definition Language is employed to apply these rules on data elements within an XM file.
An XML Schema is therefore incredibly helpful and versatile, allowing you to create very intricate and detailed data elements by specifying which elements inside of your data objects you may include or ought to include in your xml file, such as the string, integers etc.
A significant thing to be aware is the fact Schemas are also xml documents therefore they will also have to be valid and in accordance with normal syntax and other rules of xml as well, also referred to as a schema specification or even schema schema.
Additionally, there are additional meta languages that have been created solely to convey XML schemas, such as DTD, XML Schema and Relax NG. The latter two are a lot more developed and expressive than DTD, which happens to be actually rather limited with regard to capability.
To basically hook up your XML schema to your XML file (for validation functions as well as check the XML file is as per the specifications specified by the XML schema, the precise method depends on the schema language that you employ, one example is it could be as simple as calling in the schema from inside your xml file ie by adding the path via markup, generally known as imbedding or it could be via some other exterior method ie an xml schema validator, which might also be an online tool or even a computer's desktop based application.
To work with and change your XML schemas, you are able to use any of the free, open source and commercial XSD Editors that are available. These are typically available in a range of calibres, begining with the very basic and unimpressive functionality and feature sets, to some of the high end editors which feature graphical xml / schema representation and editing, along with syntax highlighting and source / wysiwyg view.
For minimal xml work, notepad or notepad , both available for free are more than up to the task, however, for more intense xml work, particularly development and professional xml coding, you should look at utilizing a commercial xml / xsd editor which will help you improve your development time and lessen errors in your code.
If you would like learn more about xml schemas or have an interest in finding sample xml schemas, think about reading a more advanced and comprehensive xml schema guide including the one here, http://www.liquid-technologies.com/Tutorials/XmlSchemas/XsdTutorial_01.aspx, or perhaps check out wiki or the w3c website.
The W3 schools webpage provides some good training for beginners however if you happen to be more advanced or intermediate programmer this website is just not for you because material is actually really simple and easy targeted at newbie learners.
Normally, an XSDL or XML Schema Definition Language is employed to apply these rules on data elements within an XM file.
An XML Schema is therefore incredibly helpful and versatile, allowing you to create very intricate and detailed data elements by specifying which elements inside of your data objects you may include or ought to include in your xml file, such as the string, integers etc.
A significant thing to be aware is the fact Schemas are also xml documents therefore they will also have to be valid and in accordance with normal syntax and other rules of xml as well, also referred to as a schema specification or even schema schema.
Additionally, there are additional meta languages that have been created solely to convey XML schemas, such as DTD, XML Schema and Relax NG. The latter two are a lot more developed and expressive than DTD, which happens to be actually rather limited with regard to capability.
To basically hook up your XML schema to your XML file (for validation functions as well as check the XML file is as per the specifications specified by the XML schema, the precise method depends on the schema language that you employ, one example is it could be as simple as calling in the schema from inside your xml file ie by adding the path via markup, generally known as imbedding or it could be via some other exterior method ie an xml schema validator, which might also be an online tool or even a computer's desktop based application.
To work with and change your XML schemas, you are able to use any of the free, open source and commercial XSD Editors that are available. These are typically available in a range of calibres, begining with the very basic and unimpressive functionality and feature sets, to some of the high end editors which feature graphical xml / schema representation and editing, along with syntax highlighting and source / wysiwyg view.
For minimal xml work, notepad or notepad , both available for free are more than up to the task, however, for more intense xml work, particularly development and professional xml coding, you should look at utilizing a commercial xml / xsd editor which will help you improve your development time and lessen errors in your code.
If you would like learn more about xml schemas or have an interest in finding sample xml schemas, think about reading a more advanced and comprehensive xml schema guide including the one here, http://www.liquid-technologies.com/Tutorials/XmlSchemas/XsdTutorial_01.aspx, or perhaps check out wiki or the w3c website.
The W3 schools webpage provides some good training for beginners however if you happen to be more advanced or intermediate programmer this website is just not for you because material is actually really simple and easy targeted at newbie learners.
Friday, 22 February 2013
The Benefits of XML & Java Over HTML
The omnipotent presence of the internet won't have escaped many people’s attentions unnoticed. In today’s modern age it is possible to browse the online market place and get goods in the convenience of any setting on the planet this includes whilst relaxing on the beachfront in Acapulco and not just from a PC or Laptop, today you can actually do all of this from a tablet or even just by your mobile device.
Nevertheless in spite of this level of popularity and also considerable use of HTML, it's in reality quite a limited technology and as the web has become more difficult and dynamic triggering new demands such as data interchange, interoperability etc. Which all HTML is unsuited for, and in reality wasn't ideal for in its original inception.
For that reason and numerous others, a new technology was in fact required, XML fulfilled the requirement perfectly. XML is a lot like HTML in syntax and structure, but it is way more than HTML, but if you happen to be conversant in HTML you'll not have any issues comprehending XML code.
XML is a markup language, also referred to as a meta language, meaning it is actually a language which you can use to define new markup languages i.e. you may make your own language to match your own application or domain.
Another fantastic aspect of XML would it be will work superbly with other related technologies for instance Java. For example, XML exposes the internet and java developing to portable non browser functionality. Quite simply, it frees and separates the content from the internet browser, exactly the same way as Java frees program behaviour from the platform. XML makes your web content available for other programs and applications in real time.
Because of this and much more, Java is an excellent technology to make use of with XML, specifically for data representation etc.
The limitation with HTML as said before, is that it had never been created for the modern demands of the internet, it’s more of a language about form rather than substance or content ie relating to the structure and presentation. This creates a significant challenge for innovative web developers attempting to create more versatile and robust information based systems or perhaps functionality.
Utilizing Java and XML you could carry out a lot of development tasks and build an array of versatile features as a consequence of benefits that follow which is not provided by HTML.
Extensible - design your very own markup tags to fit your personal needs.
Not display centric - HTML tags are pre-occupied with instructing the internet browser how to show information, they can't accomplish anything else, XML as well as java alternatively can easily separate content from structure so are suitable for network programs and able to complete other functions like business enterprise functions and even function with old legacy systems as well as brand new systems that come into being.
Directly reusable - it is possible to reuse your data several times and even alter your source data while not having to recreate your pages all over again or for it to break your website. For the reason that content and presentation are separated.
For all these reasons and much more, xml and java usually are much more helpful than plain HTML for developing trustworthy and robust systems and also functionality. Should you prefer a WYSIWYG user interface when coding and working with xml and java code, you should consider using an equally flexible and versatile xml toolkit or visit http://www.liquid-technologies.com/XmlDataBinding/Xml-Schema-To-Java.aspx for more information on xml java.
Nevertheless in spite of this level of popularity and also considerable use of HTML, it's in reality quite a limited technology and as the web has become more difficult and dynamic triggering new demands such as data interchange, interoperability etc. Which all HTML is unsuited for, and in reality wasn't ideal for in its original inception.
For that reason and numerous others, a new technology was in fact required, XML fulfilled the requirement perfectly. XML is a lot like HTML in syntax and structure, but it is way more than HTML, but if you happen to be conversant in HTML you'll not have any issues comprehending XML code.
XML is a markup language, also referred to as a meta language, meaning it is actually a language which you can use to define new markup languages i.e. you may make your own language to match your own application or domain.
Another fantastic aspect of XML would it be will work superbly with other related technologies for instance Java. For example, XML exposes the internet and java developing to portable non browser functionality. Quite simply, it frees and separates the content from the internet browser, exactly the same way as Java frees program behaviour from the platform. XML makes your web content available for other programs and applications in real time.
Because of this and much more, Java is an excellent technology to make use of with XML, specifically for data representation etc.
The limitation with HTML as said before, is that it had never been created for the modern demands of the internet, it’s more of a language about form rather than substance or content ie relating to the structure and presentation. This creates a significant challenge for innovative web developers attempting to create more versatile and robust information based systems or perhaps functionality.
Utilizing Java and XML you could carry out a lot of development tasks and build an array of versatile features as a consequence of benefits that follow which is not provided by HTML.
Extensible - design your very own markup tags to fit your personal needs.
Not display centric - HTML tags are pre-occupied with instructing the internet browser how to show information, they can't accomplish anything else, XML as well as java alternatively can easily separate content from structure so are suitable for network programs and able to complete other functions like business enterprise functions and even function with old legacy systems as well as brand new systems that come into being.
Directly reusable - it is possible to reuse your data several times and even alter your source data while not having to recreate your pages all over again or for it to break your website. For the reason that content and presentation are separated.
For all these reasons and much more, xml and java usually are much more helpful than plain HTML for developing trustworthy and robust systems and also functionality. Should you prefer a WYSIWYG user interface when coding and working with xml and java code, you should consider using an equally flexible and versatile xml toolkit or visit http://www.liquid-technologies.com/XmlDataBinding/Xml-Schema-To-Java.aspx for more information on xml java.
Subscribe to:
Posts (Atom)