XPath is a W3C standard and language which can be used to find info or data from an XML file, it’s very good for navigating through elements and attributes in a simple manner.
The best way to look at it is something such as find and replace function in MS Word, however XPath is a lot more advanced than this with its own rules, syntax, structure as well as other such rigorous criteria, nevertheless the more familiar you become with XPath the easier it will get, for me, these days it is more second nature.
The other point to consider is, just how important is XPath. In the grand scheme of things, you may almost certainly cope without it, in reality whatever that you can do with XPath when working with an XML document, you are able to realize without XPath too, and so in that sense it's not essential, it can be handy.
As an example, utilizing XPath presents several benefits with regards to application development and dealing with XML documents, like speed, ease, effectiveness, productivity, simplicity etc etc
A very important differentiation to note is also that XPath is not really an XML language, though it may be closely connected with XML, it's really a method for querying XML documents, but being related to XML, it’s also employed in related specifications and languages like XSLT as well as in DOM implementations.
Don't forget that XML is nothing at all but a textual representation of associated nodes in a tree like design. There are seven core nodes in XPath, these are Root, Element, Text, Attribute, Comment, Processing instruction and Namespace nodes.
If you're accustomed to programming syntax and taxonomy, these kind of terms will not be uncommon however for those with no programming background, I am going to quickly elaborate.
The root node is the top or upper most part of an XML document, or in our tree analogy, it is the root from which the branches or elements spring from.
An element is a component of the data, by way of example in an xml file concerning customers, an element may just be the first name or customer id. The element alone can easily contain text or attribute based information.
Commenting is also enabled in an XML document. These are a bit synonymous to XPath as well, but a bit distinctive in some aspects.
And many of the apparent features of XPath, you can also find quite a few not so apparent, such as, in XPath, the tree’s root node is not the same as its root element.
The tree’s root node has the entire document, including the root element and also comments and processing instructions that occur prior to the root element start tag or following the root element end tag.
Also, the XPath data models doesn’t have everything in the xml document, for instance the XML declaration and the DTD. Nevertheless, you may give a default value for your attributes and this will be recognized by XPath.
Last of all, I should point out that in XPath, the xmlns attributes aren't considered attribute nodes but instead namespace nodes, yet any non-namespace aware parser will view them as an attribute.
More info on XPath can be found at W3C schools or you can consider this XPath tutorial.
Tuesday, 18 December 2012
Monday, 10 December 2012
Just What Exactly Is XPath
XPath is a query language employed in XML to query and also pick nodes from an XML document. The truth is, you may even work with it to determine ideals, like strings, numbers and Bolean values) in the content of any XML document.
It works by pointing to data within a XML file which are nodes, it may also point to nodes and carry out simple mathematics measurements, in reality XPath is simply as vibrant as XML and you could select nodes depending on many conditions similar to mathematics comparisons.
XPath is incredibly versatile therefore you can use it with some other standards beyond XML, for example XSLT and XPointer. Using XSLT there is the capacity to develop one XML document to the back of some other XML document, and also make a XHTML document which may be read and looked at by the bare human eye.
But how does XPath work exactly? To be really exact, it works by pointing to the XML dataset, in other words you have to access the DOM and not really the actual characters which might be in the XML tag. So for this reason, so that you can process with XPath, you'll need a document format that can establish a DOM or similar dataset, such as XML or JSON.
Even more importantly, you may use a location path syntax, which you'll do in a few methods. An individual '/' at the beginning of an area path presents the document node, the only child of which is the root element. If a location path commences with a '/' (thus from the document node), it is an absolute location path, otherwise it's a relative location path.
When working with XPath to make your search queries, you can use a number of parameters or queries.
One such parameter is Predicate (the part that is inside the square brackets), that can be used to filter results and might include any expression. In cases where the result is not empty, the considered to be true, and if it is empty then it is deemed false. If the result is a numeric value, that number value represents the proximity of the position of the node
From the proximity position, you have a forward and reverse axis. The forward axis is one where all the nodes come after the context node, like child etc. The Reverse axis is the opposite, i.e. the nodes arrive prior to the context node, like parent etc.
There are also numerous important functions that are utilized in Xpath, these include position() and last(). Last() will return the last position inside your current node selection and position() will return the position of a node in your selection.
Finally, XPath also offers full assistance for namespaces, the names are indicated in the same manner as in XML nonetheless the prefix itself is bound externally to the namespace URI, which means it should be done by the external application or specification that it is being used in.
A lot of XPath can be found at W3C schools you can also refer to this XPath tutorial.
It works by pointing to data within a XML file which are nodes, it may also point to nodes and carry out simple mathematics measurements, in reality XPath is simply as vibrant as XML and you could select nodes depending on many conditions similar to mathematics comparisons.
XPath is incredibly versatile therefore you can use it with some other standards beyond XML, for example XSLT and XPointer. Using XSLT there is the capacity to develop one XML document to the back of some other XML document, and also make a XHTML document which may be read and looked at by the bare human eye.
But how does XPath work exactly? To be really exact, it works by pointing to the XML dataset, in other words you have to access the DOM and not really the actual characters which might be in the XML tag. So for this reason, so that you can process with XPath, you'll need a document format that can establish a DOM or similar dataset, such as XML or JSON.
Even more importantly, you may use a location path syntax, which you'll do in a few methods. An individual '/' at the beginning of an area path presents the document node, the only child of which is the root element. If a location path commences with a '/' (thus from the document node), it is an absolute location path, otherwise it's a relative location path.
When working with XPath to make your search queries, you can use a number of parameters or queries.
One such parameter is Predicate (the part that is inside the square brackets), that can be used to filter results and might include any expression. In cases where the result is not empty, the considered to be true, and if it is empty then it is deemed false. If the result is a numeric value, that number value represents the proximity of the position of the node
From the proximity position, you have a forward and reverse axis. The forward axis is one where all the nodes come after the context node, like child etc. The Reverse axis is the opposite, i.e. the nodes arrive prior to the context node, like parent etc.
There are also numerous important functions that are utilized in Xpath, these include position() and last(). Last() will return the last position inside your current node selection and position() will return the position of a node in your selection.
Finally, XPath also offers full assistance for namespaces, the names are indicated in the same manner as in XML nonetheless the prefix itself is bound externally to the namespace URI, which means it should be done by the external application or specification that it is being used in.
A lot of XPath can be found at W3C schools you can also refer to this XPath tutorial.
Friday, 16 November 2012
Guide To Microsoft Silverlight
Silverlight is known as a software tool by Microsoft for the purpose of developing ultra powerful, rich internet applications, it's in actual fact much the same in traits and also intentions to Adobe Flash.
Microsoft themselves talk about their service as being a strong development tool for making engaging, interactive user experiences for Web and also mobile apps.
Some of the many features mentioned on their web site incorporates, IIS Smooth Streaming, Pivot Viewer, for visualizing massive amounts of data in a fun and visual way, Sketch Flow, more for sketching out an application and its uses, Deep Zoom, Pixel Shader and over 60 new controls just like charting and new media.
However, as opposed to Flash, Silverlight is a free plugin which is run by the .Net framework, therefore extremely easy and user-friendly to employ with Visual Studio, and it is suitable for a variety of browsers and devices.
In the beginning Microsoft focused upon streaming media etc but since then Silverlight has expanded substantially to feature support for multimedia, graphics and animation.
Silverlight at present also includes support for specific languages and development tools, in fact it is also one of the key development platforms for the Windows phone.
Silverlight additionally employs XAML (Extensible Application Markup Language) to assert user interfaces, because of this it is simple to create Windows sidebar devices and also other fancy apps with neat vector graphics and animations.
It's also possible to write Silverlight apps in any .Net programming languages, meaning that any development tool that can be used in .Net, you may use in Silverlight. Hence Microsoft are pitching Visual Studio as the prefect tool for developers to create and debug Silverlight applications.
Since its introduction in 2007, Microsoft have refreshed Silverlight every year with edition 1 in 2007 and version 5 (the current and up to-date model) introduced in May 2012. The 2012 version (Silverlight 5) can actually be used on Windows and Mac and with Mobile devices running Windows or Symbian.
The below highlights all the editions and provides some background information.
Silverlight 1 was introduced in 2007, it had been comprised of various core features including the UI controls, media playback, DOM integration, interactivity and user input, and graphics and animation.
Silverlight 2 followed soon after in the same year and was similar to version 1 but in addition included a version of the .Net framework which allowed it to run any other programs developed in any .Net language.
Silverlight 3 was unveiled in 2008 as a beta and then officially unveiled in July 2009. This edition included even more controls for example DataGrid and TreeView, DataPager (permitted you to see paginated data), DataForm (for form based applications) along with numerous layout panels.
Silverlight 4 was launched in November 2009 as a beta with the official release in April 2010. This bundled much more characteristics than ever before for example rendering HTML, better localization, support for Google Chrome browser, brand new and enhanced controls and a whole lot. It also came with Silverlight 4 tools for developers, delivering much more development possibilities
Silverlight 5 was launched for download in December 2011. The newest features included 64-bit support, 3D graphics, GPU accelerated video decoding and playback speed controls.
As said before above, Silverlight applications can be written in any .NET programming language. As such, any development tools which may be used with .NET languages can work with Silverlight. When you are making use of Silverlight and XML, you can also make use of an XML Silverlight tool like Liquid XML studio.
Microsoft themselves talk about their service as being a strong development tool for making engaging, interactive user experiences for Web and also mobile apps.
Some of the many features mentioned on their web site incorporates, IIS Smooth Streaming, Pivot Viewer, for visualizing massive amounts of data in a fun and visual way, Sketch Flow, more for sketching out an application and its uses, Deep Zoom, Pixel Shader and over 60 new controls just like charting and new media.
However, as opposed to Flash, Silverlight is a free plugin which is run by the .Net framework, therefore extremely easy and user-friendly to employ with Visual Studio, and it is suitable for a variety of browsers and devices.
In the beginning Microsoft focused upon streaming media etc but since then Silverlight has expanded substantially to feature support for multimedia, graphics and animation.
Silverlight at present also includes support for specific languages and development tools, in fact it is also one of the key development platforms for the Windows phone.
Silverlight additionally employs XAML (Extensible Application Markup Language) to assert user interfaces, because of this it is simple to create Windows sidebar devices and also other fancy apps with neat vector graphics and animations.
It's also possible to write Silverlight apps in any .Net programming languages, meaning that any development tool that can be used in .Net, you may use in Silverlight. Hence Microsoft are pitching Visual Studio as the prefect tool for developers to create and debug Silverlight applications.
Since its introduction in 2007, Microsoft have refreshed Silverlight every year with edition 1 in 2007 and version 5 (the current and up to-date model) introduced in May 2012. The 2012 version (Silverlight 5) can actually be used on Windows and Mac and with Mobile devices running Windows or Symbian.
The below highlights all the editions and provides some background information.
Silverlight 1 was introduced in 2007, it had been comprised of various core features including the UI controls, media playback, DOM integration, interactivity and user input, and graphics and animation.
Silverlight 2 followed soon after in the same year and was similar to version 1 but in addition included a version of the .Net framework which allowed it to run any other programs developed in any .Net language.
Silverlight 3 was unveiled in 2008 as a beta and then officially unveiled in July 2009. This edition included even more controls for example DataGrid and TreeView, DataPager (permitted you to see paginated data), DataForm (for form based applications) along with numerous layout panels.
Silverlight 4 was launched in November 2009 as a beta with the official release in April 2010. This bundled much more characteristics than ever before for example rendering HTML, better localization, support for Google Chrome browser, brand new and enhanced controls and a whole lot. It also came with Silverlight 4 tools for developers, delivering much more development possibilities
Silverlight 5 was launched for download in December 2011. The newest features included 64-bit support, 3D graphics, GPU accelerated video decoding and playback speed controls.
As said before above, Silverlight applications can be written in any .NET programming language. As such, any development tools which may be used with .NET languages can work with Silverlight. When you are making use of Silverlight and XML, you can also make use of an XML Silverlight tool like Liquid XML studio.
Thursday, 8 November 2012
Just What Is Silverlight
Silverlight is a software application created by Microsoft, an effective way to illustrate it to you, will be to liken it to Adobe Flash. Silverlight in characteristics and purpose is much like Adobe Flash.
Microsoft by themselves explain their product as;
“Silverlight is a powerful development tool for creating engaging, interactive user experiences for Web and mobile applications. Silverlight is a free plug-in, powered by the .NET framework and compatible with multiple browsers, devices and operating systems, bringing a new level of interactivity wherever the Web works.”
At first the focus was greatly about producing rich and engaging user experiences through rich media, streaming and animation allowing web programmers to create really engaging and interactive sites, the same as with Flash.
Nevertheless what lots of people are not aware of is how much Silverlight now features a lot more for business application development and just how in fact, Silverlight is currently being frequently used for additional purposes over and above merely engaging content.
The fact is Silverlight is now being utilized within business for data management, CRM and a lot of other business critical operations, in a nutshell, a growing number of business applications are making use of Silverlight to assist business demands.
A business application carries a very precise purpose or goal, and generally assists a corporation to cut costs or time, or simply to enables them to to improve customer satisfaction. Common examples could include CRM applications, time-tracking in addition to expense claim applications, e-commerce and e-tail experiences, purchase request applications, and HR employee management systems.
Users of business software expect rich, functional, and well-performing user interfaces similar to those typically provided by the desktop applications they are familliar with. With the latest business application-focused enhancements to Silverlight, the rich capabilities of its user interface, and the associated tooling provided by Visual Studio and Expression Studio, you can now rapidly create this type of application and enjoy the benefits of Web delivery and deployment.
So just what is Silverlight and also how does it work? As stated above Silverlight is a software application from Microsoft for making appealing content akin to Adobe Flash, however it is even more than Flash and will also be used in business application development.
Silverlight is a completely free software which comes in a browser plug-in format, there isn't a need to download it as an application on your C drive plus its as a result very small and self-contained.
Silverlight might be run in all of the primary browsers including Mozilla, Firefox, Apple Safari, Opera, and Internet Explorer of course, and it is platform independent and operates by displaying a programming framework that is a subset of the .Net Framework.
To install Silverlight you may download it straight from the Microsoft website and download it to your computer as a plug-in. You can think of this plug-in as a scaled down form of the .Net framework as it only has the classes and functionality that's applicable to a Silverlight web client.
Due to this fact, you can actually write real, compiled and managed code that's completed in the context of the client browser itself. Finally, Silverlight employs XAML (Extensible Application Markup Language) to make the user interface.
Silverlight programs may be developed in any .NET programming language. Because of this, any development tools that may be used with .NET languages can function with Silverlight. If you happen to be dealing with Silverlight and XML, you can also readily XML Silverlight tool similar to Liquid XML studio.
Microsoft by themselves explain their product as;
“Silverlight is a powerful development tool for creating engaging, interactive user experiences for Web and mobile applications. Silverlight is a free plug-in, powered by the .NET framework and compatible with multiple browsers, devices and operating systems, bringing a new level of interactivity wherever the Web works.”
At first the focus was greatly about producing rich and engaging user experiences through rich media, streaming and animation allowing web programmers to create really engaging and interactive sites, the same as with Flash.
Nevertheless what lots of people are not aware of is how much Silverlight now features a lot more for business application development and just how in fact, Silverlight is currently being frequently used for additional purposes over and above merely engaging content.
The fact is Silverlight is now being utilized within business for data management, CRM and a lot of other business critical operations, in a nutshell, a growing number of business applications are making use of Silverlight to assist business demands.
A business application carries a very precise purpose or goal, and generally assists a corporation to cut costs or time, or simply to enables them to to improve customer satisfaction. Common examples could include CRM applications, time-tracking in addition to expense claim applications, e-commerce and e-tail experiences, purchase request applications, and HR employee management systems.
Users of business software expect rich, functional, and well-performing user interfaces similar to those typically provided by the desktop applications they are familliar with. With the latest business application-focused enhancements to Silverlight, the rich capabilities of its user interface, and the associated tooling provided by Visual Studio and Expression Studio, you can now rapidly create this type of application and enjoy the benefits of Web delivery and deployment.
So just what is Silverlight and also how does it work? As stated above Silverlight is a software application from Microsoft for making appealing content akin to Adobe Flash, however it is even more than Flash and will also be used in business application development.
Silverlight is a completely free software which comes in a browser plug-in format, there isn't a need to download it as an application on your C drive plus its as a result very small and self-contained.
Silverlight might be run in all of the primary browsers including Mozilla, Firefox, Apple Safari, Opera, and Internet Explorer of course, and it is platform independent and operates by displaying a programming framework that is a subset of the .Net Framework.
To install Silverlight you may download it straight from the Microsoft website and download it to your computer as a plug-in. You can think of this plug-in as a scaled down form of the .Net framework as it only has the classes and functionality that's applicable to a Silverlight web client.
Due to this fact, you can actually write real, compiled and managed code that's completed in the context of the client browser itself. Finally, Silverlight employs XAML (Extensible Application Markup Language) to make the user interface.
Silverlight programs may be developed in any .NET programming language. Because of this, any development tools that may be used with .NET languages can function with Silverlight. If you happen to be dealing with Silverlight and XML, you can also readily XML Silverlight tool similar to Liquid XML studio.
Monday, 15 October 2012
XML Elements And Ways To Develop Them
Elements are also the key building blocks of XML and is also one of several benefits XML provides over other languages. In XML you may create your very own element tags to match your own requirements.
With other languages, like HTML or PHP, you can just use predetermined labels which are particular to that language. In HTML by way of example you are only have body elements within the <body> tag and header elements inside the <head> tag. This is certainly tough and even time intensive and means you need to comprehend the language and syntax as well as where it goes to create web pages.
This is where XML is special, you can make your own personal elements and title these to suit your own purposes, allowing it to be entirely possible for newbie’s to grasp and apply XML.
So what are XML elements? Pretty much elements are names that are assigned to areas of data or information. As an example, let’s say you want to develop a catalogue of all your household items for insurance applications.
You could potentially try to portion items by room after which further sub divide by value etc. In XML the parser will look at the construction compared to names of the elements, in HTML it will be the other way round, the labels will be more significant for the parsing to be successful.
While XML is a lot more focused on structure, versus naming conventions, you'll still have to comply with some fundamental guidelines when creating elements. The first element is considered as the root; the root element consists of all the other elements inside it, similar to a folder contains sub folders and files.
After the root, the following element is called the parent and inside the parent are child elements, not all parent elements have to have child element, it will be at your discretion and is determined by how and just what you want to design your XML for.
The key point to creating a XML file that can be easily parsed is with the organisation, you need to make your elements to make sure they appear sensible from a structural perspective.
For example if you're a constructing a stock list of your products, it might make more sense to have products as your root element and then the categories as the parent and then individual category products as the child elements.
Having a well laid and common sense structure is going to pay off in the long term when you need to handle updates or parsing as all the elements will naturally fit into place.
Along with element structure and naming, its also wise to keep the following easy tips in mind too.
Each and every element tag requires a opening and closing syntax ie <xml> and </xml>, if you forget you will receive an error message whenever you try and validate or parse your xml file.
Be sure you organize your element names intelligently and rationally. Name your tags in a means by which is smart to you.
Root element
Parent element
Child element
Two parent elements for the product stock list could have child tags named ‹product›. In fact, parent names may also be the same.
Product - root element
Item - parent element
Item - parent element
So that’s a rapid and straightforward look at xml and how to write an xml file, to study more advanced material, you can search Google or view this xml tutorial.
With other languages, like HTML or PHP, you can just use predetermined labels which are particular to that language. In HTML by way of example you are only have body elements within the <body> tag and header elements inside the <head> tag. This is certainly tough and even time intensive and means you need to comprehend the language and syntax as well as where it goes to create web pages.
This is where XML is special, you can make your own personal elements and title these to suit your own purposes, allowing it to be entirely possible for newbie’s to grasp and apply XML.
So what are XML elements? Pretty much elements are names that are assigned to areas of data or information. As an example, let’s say you want to develop a catalogue of all your household items for insurance applications.
You could potentially try to portion items by room after which further sub divide by value etc. In XML the parser will look at the construction compared to names of the elements, in HTML it will be the other way round, the labels will be more significant for the parsing to be successful.
While XML is a lot more focused on structure, versus naming conventions, you'll still have to comply with some fundamental guidelines when creating elements. The first element is considered as the root; the root element consists of all the other elements inside it, similar to a folder contains sub folders and files.
After the root, the following element is called the parent and inside the parent are child elements, not all parent elements have to have child element, it will be at your discretion and is determined by how and just what you want to design your XML for.
The key point to creating a XML file that can be easily parsed is with the organisation, you need to make your elements to make sure they appear sensible from a structural perspective.
For example if you're a constructing a stock list of your products, it might make more sense to have products as your root element and then the categories as the parent and then individual category products as the child elements.
Having a well laid and common sense structure is going to pay off in the long term when you need to handle updates or parsing as all the elements will naturally fit into place.
Along with element structure and naming, its also wise to keep the following easy tips in mind too.
Each and every element tag requires a opening and closing syntax ie <xml> and </xml>, if you forget you will receive an error message whenever you try and validate or parse your xml file.
Be sure you organize your element names intelligently and rationally. Name your tags in a means by which is smart to you.
Root element
Parent element
Child element
Two parent elements for the product stock list could have child tags named ‹product›. In fact, parent names may also be the same.
Product - root element
Item - parent element
Item - parent element
So that’s a rapid and straightforward look at xml and how to write an xml file, to study more advanced material, you can search Google or view this xml tutorial.
Wednesday, 3 October 2012
9 Very Important Terminology In XML
In contrast to the popular myth about XML, it's not actually a development language, it is a mark-up language, and as a result, essentially the most least complicated computer language around.
XML is really a non semantic language therefore, you can develop your own element tags and in contrast to other languages there isn't any real complex syntax structures to think about.
Given it isn’t a programming language, XML itself doesn’t really do anything, by design, it’s really a storage container for data and so it only comes up as very simple text on web pages or as a text file.
You can also utilize XML to properly exhibit pages around distinct internet browsers and version types, to do this you have to compose different formatting directions, known as DTD.s or Schemas.
Dealing with XML and building basic files is really rather simple if you can learn the basic principles, below is a glance at 9 of the most well-known XML words that you may run into.
1. XML (Extensible Mark-up Language
As already stated, xml is a markup language that works as a container for the holding of data and allows data and information to be transported and displayed on the online as webpages. Within XML their can also be subsets of languages including XSL which supports in validation and formatting.
2. Element Tags
You may make as well as name your element tags as you desire as well as suit your own specific requirements. Element tags enable you to build a hierarchical syntax and order to your code.
By way of example, let’s say you wished to have a stock list of your stock items for your ecommerce bike shop website, you can use key tag names like product, and also within the product tag element, you can have child elements like men’s bikes, women’s, child bikes etc.
The beauty and simpleness of XML is in its ability to build your own element tags, just be sure you close them.
<product> - element tag
</product> - closing tag
3. Declaration Statement
The declaration statement ought to be at the beginning of your xml file, the aim of the declaration statement is to specify the language, version as well as designate encoding and declare the standalone status of the file, without it the Internet processor will not be able to determine the code.
<xml version="1.0" encoding="UTF-8" standalone="yes">
4. Root Element
The root element, like the title indicates is the very first named tag of every XML file and it's a container for all other elements, consequently it is in the root.
<products> - root element
5. Parent Element
The parent tag retains elements linked to the root, and so within our example of products, the parent would be the associated categories or products.
<products> - parent element
<mens bike> - element tag
6. Child Element
The child element is so called, given it belongs to the parent element and thus, is situated inside it.
<products> - root/parent element
<mens bike> - parent element
<cube bike> - child element
7. Attributes
An attribute is a name or value that sits within the element tag, in our example an attribute could be frame size of the bike or the colour style.
<cube bike size="20"> - cube bike is the element and size is the attribute
8. Comments
Comments will be only viewable in the source and are generally mostly for editors and authors who want to update or customize the xml file, comments are not exposed on a webpage
<!--this is a comment -->
9. Data Strings
A data string will be the complete opposite of a comment in that it is viewable on the webpage, a data string in this context is the equivalent of the description field.
<description> - element tag
Extensive range of cube bikes available. - data string viewable on a webpage
</description> - closing tag
So that’s an easy and easy look at xml and the best way to create an xml file, to study more advanced material, you can search Google or check out this xml tutorial.
XML is really a non semantic language therefore, you can develop your own element tags and in contrast to other languages there isn't any real complex syntax structures to think about.
Given it isn’t a programming language, XML itself doesn’t really do anything, by design, it’s really a storage container for data and so it only comes up as very simple text on web pages or as a text file.
You can also utilize XML to properly exhibit pages around distinct internet browsers and version types, to do this you have to compose different formatting directions, known as DTD.s or Schemas.
Dealing with XML and building basic files is really rather simple if you can learn the basic principles, below is a glance at 9 of the most well-known XML words that you may run into.
1. XML (Extensible Mark-up Language
As already stated, xml is a markup language that works as a container for the holding of data and allows data and information to be transported and displayed on the online as webpages. Within XML their can also be subsets of languages including XSL which supports in validation and formatting.
2. Element Tags
You may make as well as name your element tags as you desire as well as suit your own specific requirements. Element tags enable you to build a hierarchical syntax and order to your code.
By way of example, let’s say you wished to have a stock list of your stock items for your ecommerce bike shop website, you can use key tag names like product, and also within the product tag element, you can have child elements like men’s bikes, women’s, child bikes etc.
The beauty and simpleness of XML is in its ability to build your own element tags, just be sure you close them.
<product> - element tag
</product> - closing tag
3. Declaration Statement
The declaration statement ought to be at the beginning of your xml file, the aim of the declaration statement is to specify the language, version as well as designate encoding and declare the standalone status of the file, without it the Internet processor will not be able to determine the code.
<xml version="1.0" encoding="UTF-8" standalone="yes">
4. Root Element
The root element, like the title indicates is the very first named tag of every XML file and it's a container for all other elements, consequently it is in the root.
<products> - root element
5. Parent Element
The parent tag retains elements linked to the root, and so within our example of products, the parent would be the associated categories or products.
<products> - parent element
<mens bike> - element tag
6. Child Element
The child element is so called, given it belongs to the parent element and thus, is situated inside it.
<products> - root/parent element
<mens bike> - parent element
<cube bike> - child element
7. Attributes
An attribute is a name or value that sits within the element tag, in our example an attribute could be frame size of the bike or the colour style.
<cube bike size="20"> - cube bike is the element and size is the attribute
8. Comments
Comments will be only viewable in the source and are generally mostly for editors and authors who want to update or customize the xml file, comments are not exposed on a webpage
<!--this is a comment -->
9. Data Strings
A data string will be the complete opposite of a comment in that it is viewable on the webpage, a data string in this context is the equivalent of the description field.
<description> - element tag
Extensive range of cube bikes available. - data string viewable on a webpage
</description> - closing tag
So that’s an easy and easy look at xml and the best way to create an xml file, to study more advanced material, you can search Google or check out this xml tutorial.
Friday, 21 September 2012
Going Ahead Of HTML TO XML
HTML is certainly a well-known coding language used by site designers to generate internet pages and not to mention full web sites can be done applying html code alone. HTML is short for Hypertext Markup Language and has been made use of basically since the start of the net, but as the web has evolved, several common html practices also have evolved.
To illustrate, applying tables to design a web page was initially quite normal in the early days of the world-wide-web but as web browsers changed and technology improved, brand new approaches like CSS progressed to allow site designers to build web sites that could be shown in the same way across numerous internet browsers (browser compatibility) and also exactly the same internet browsers but different variants (version compatibility).
A further enlargement came with the development XHTML, an acronym for Extensibe Hypertext Markup Language, a more recent, more versatile version of HTML.
XHTML is part of the family of XML languages even though it is furthermore an extension of HTML, if not more closely relevant to html version 5.0, it is actually developed to perform far more robustly with xml dependent user agents and also properties.
XHTML will also be referred to as an application of XML as it is actually a more prohibitive subset of SGML, which means that unlike html, it is possible to parse xhtml documents by using a common xml tool, similar to an xml parser.
The only requirement is that the xhtml document should be well formed because there are specified xml rules to go by, whereas with html, you simply can't parse it unless you happen to be running a more lenient, html specific parser.
The main variation regarding xml and html is that xml is a markup language, there are no semantics involved and simply no rules as to what exactly could and can't be included, xml merely describes the data. Html conversely has semantic meaning and states how data and text is intended to be viewed.
For example, in html, you can only make use of the head tag to describe the header elements, where as all body components must be contained inside of the body tag, to incorporate a paragraph you have to include it within a paragraph tag, this is precisely what is meant by the term semantics. XML as, I have just mentioned, has absolutely no semantic tags or predetermined meanings, for instance inside an xml document your tags will be able to have any meaning as well as any data, you create your own tags.
Due to all these key differences, xml, unlike html, is not something that a person can look at with the naked eye on any website, instead it sits in the background, or the source code of the internet site, as internet websites grew to become more dynamic entities, not to mention the requirement to consume this data originated via completely different platforms, from tablets, to PCs to smart phones, XML turned out to be a lot more crucial to making certain that this information was ordered, stored and transferred in a dependable and universal approach.
Xhtml satisfied an important objective and was in fact made for a number of purposes. The principal good reason had been to fix the compatibility gap between a client computer and a webpage on a remote computer, a language was needed that could transport and express the meaning of data on a web page to a pc, xhtml filled this need.
The next reason was basically to satisfy the gap for a standard language format which might be properly viewed across various internet browsers and platforms as well as on different screen types, again xhtml satisfied this particular requirement beautifully.
With the huge selection of various gadgets, from smart phones, PCs, laptops, tablets, not to mention distinct internet browsers from Internet Explorer to Mozilla, and variants from IE7 to IE8, it is extremely critical for any would be web designer to migrate from html to xhtml development to permit your websites to display effectively across all platforms and browsers.
To illustrate, applying tables to design a web page was initially quite normal in the early days of the world-wide-web but as web browsers changed and technology improved, brand new approaches like CSS progressed to allow site designers to build web sites that could be shown in the same way across numerous internet browsers (browser compatibility) and also exactly the same internet browsers but different variants (version compatibility).
A further enlargement came with the development XHTML, an acronym for Extensibe Hypertext Markup Language, a more recent, more versatile version of HTML.
XHTML is part of the family of XML languages even though it is furthermore an extension of HTML, if not more closely relevant to html version 5.0, it is actually developed to perform far more robustly with xml dependent user agents and also properties.
XHTML will also be referred to as an application of XML as it is actually a more prohibitive subset of SGML, which means that unlike html, it is possible to parse xhtml documents by using a common xml tool, similar to an xml parser.
The only requirement is that the xhtml document should be well formed because there are specified xml rules to go by, whereas with html, you simply can't parse it unless you happen to be running a more lenient, html specific parser.
The main variation regarding xml and html is that xml is a markup language, there are no semantics involved and simply no rules as to what exactly could and can't be included, xml merely describes the data. Html conversely has semantic meaning and states how data and text is intended to be viewed.
For example, in html, you can only make use of the head tag to describe the header elements, where as all body components must be contained inside of the body tag, to incorporate a paragraph you have to include it within a paragraph tag, this is precisely what is meant by the term semantics. XML as, I have just mentioned, has absolutely no semantic tags or predetermined meanings, for instance inside an xml document your tags will be able to have any meaning as well as any data, you create your own tags.
Due to all these key differences, xml, unlike html, is not something that a person can look at with the naked eye on any website, instead it sits in the background, or the source code of the internet site, as internet websites grew to become more dynamic entities, not to mention the requirement to consume this data originated via completely different platforms, from tablets, to PCs to smart phones, XML turned out to be a lot more crucial to making certain that this information was ordered, stored and transferred in a dependable and universal approach.
Xhtml satisfied an important objective and was in fact made for a number of purposes. The principal good reason had been to fix the compatibility gap between a client computer and a webpage on a remote computer, a language was needed that could transport and express the meaning of data on a web page to a pc, xhtml filled this need.
The next reason was basically to satisfy the gap for a standard language format which might be properly viewed across various internet browsers and platforms as well as on different screen types, again xhtml satisfied this particular requirement beautifully.
With the huge selection of various gadgets, from smart phones, PCs, laptops, tablets, not to mention distinct internet browsers from Internet Explorer to Mozilla, and variants from IE7 to IE8, it is extremely critical for any would be web designer to migrate from html to xhtml development to permit your websites to display effectively across all platforms and browsers.
Subscribe to:
Posts (Atom)