News Feed
Sections




News Archive
feed this:

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
March 29, 2011 @ 12: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.

1 comment voice your opinion now!
generate xml data xmlschemalearner github dtd xsd


Raphael Stolt's Blog:
Validating XML files within PHP 4 applications
April 24, 2007 @ 14: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.

0 comments voice your opinion now!
validate xml file php4 application xmllint schema dtd validate xml file php4 application xmllint schema dtd


PHPBuilder.com:
Using XML - Part 6 Validation
July 20, 2006 @ 09: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).

0 comments voice your opinion now!
xml validation xsl schematron dtd dom tutorial part6 xml validation xsl schematron dtd dom tutorial part6



Community Events





Don't see your event here?
Let us know!


release security opinion list composer series laravel library version community language symfony framework conference voicesoftheelephpant tool artisanfiles introduction interview podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework