Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kore Nordmann's Blog:
Generating XML schemas from XML data
Mar 29, 2011 @ 17:16:05

In a new post to his blog Kore Nordmann talks about a tool he's developed that will "learn" XML schemas based on a document it's given. The tool, the XML-schema-learner, makes it as simple as a one-line command to generate the DTD file and transform it into a schema.

You can get the "XML schema learner" from my Github account: https://github.com/kore/XML-Schema-learner. Just clone it, and you can run the tests, or use the learn command to infer XML schemas from XML data.

He includes an example XML definition and the resulting DTD that the tool generates from it, defining each of the elements and attributes each can have. The tool can then take this DTD file and generate an XSD file, creating complex and simple types that match the original data.

tagged: generate xml data xmlschemalearner github dtd xsd

Link:

Raphael Stolt's Blog:
Validating XML files within PHP 4 applications
Apr 24, 2007 @ 19:49:10

Raphael Stolt has posted a new tutorial today talking about how to validate the content of XML files within a PHP 4 application.

Today I ran into a small problem, validating import XML data against a DTD(Document Type Definition), and discovered a neat way to solve this without PHP4's own means, as the PHP 4 version on the running system wasn't supporting the DOM XML Functions. Xmllint, a command line XML tool, parses provided XML files and can be used to verify that these files are well formed and are satisfying an associated DTD/XML Schema.

In his example he shows a simple implementation of the tool, grabbing the file's information and pushing it through a command line request to check the file.

tagged: validate xml file php4 application xmllint schema dtd validate xml file php4 application xmllint schema dtd

Link:

Raphael Stolt's Blog:
Validating XML files within PHP 4 applications
Apr 24, 2007 @ 19:49:10

Raphael Stolt has posted a new tutorial today talking about how to validate the content of XML files within a PHP 4 application.

Today I ran into a small problem, validating import XML data against a DTD(Document Type Definition), and discovered a neat way to solve this without PHP4's own means, as the PHP 4 version on the running system wasn't supporting the DOM XML Functions. Xmllint, a command line XML tool, parses provided XML files and can be used to verify that these files are well formed and are satisfying an associated DTD/XML Schema.

In his example he shows a simple implementation of the tool, grabbing the file's information and pushing it through a command line request to check the file.

tagged: validate xml file php4 application xmllint schema dtd validate xml file php4 application xmllint schema dtd

Link:

PHPBuilder.com:
Using XML - Part 6: Validation
Jul 20, 2006 @ 14:46:37

PHPBuilder.com has posted part six of their "Using XML" series today with a focus on validation techniques using both normal PHP abilities and the XSL functionality in PHP5 with the Schematron language.

This series has so far focused on XML technologies and how they can be utilised using PHP 5. A subject we have not touched upon yet, is XML validation. This article will explore the application independent XML validation standards of DTD's, the XML Schema Language and the XSLT-based Schematron language.

They point back to part one of the series for the XML library they'll use and waste no time getting right into the code. They demonstrate a simple validation first before moving on to the use of DTDs to ensure the correct content. Next up is more work with the XML schemas continuing on to the Schematron functionality (their use and validation).

tagged: xml validation xsl schematron dtd dom tutorial part6 xml validation xsl schematron dtd dom tutorial part6

Link:

PHPBuilder.com:
Using XML - Part 6: Validation
Jul 20, 2006 @ 14:46:37

PHPBuilder.com has posted part six of their "Using XML" series today with a focus on validation techniques using both normal PHP abilities and the XSL functionality in PHP5 with the Schematron language.

This series has so far focused on XML technologies and how they can be utilised using PHP 5. A subject we have not touched upon yet, is XML validation. This article will explore the application independent XML validation standards of DTD's, the XML Schema Language and the XSLT-based Schematron language.

They point back to part one of the series for the XML library they'll use and waste no time getting right into the code. They demonstrate a simple validation first before moving on to the use of DTDs to ensure the correct content. Next up is more work with the XML schemas continuing on to the Schematron functionality (their use and validation).

tagged: xml validation xsl schematron dtd dom tutorial part6 xml validation xsl schematron dtd dom tutorial part6

Link:


Trending Topics: