Showing entries 1 to 10 of 35
10 Older Entries »
Displaying posts with tag: xml (reset)
Introduction to ADO.NET

ADO.NET is a part of .NET Framework that provides access to different types of data sources. ADO.NET supports relational, XML and application data. ADO.NET resides in a layer between data sources and client applications and enables customers to retrieve, manipulate and update data through ADO.NET object model. ADO.NET architecture ADO.NET was introduced in the 10th […]

The post Introduction to ADO.NET appeared first on Devart Blog.

Oxygen XML Editor

Somebody asked me about how they could convert an XML file to a CSV file to upload into MySQL. They were asking the question based on an old Convert XML to CSV blog post from 2008. Amazing though that is, I had to explain the process no longer requires manual tasks, like calling Java files from the Apache XML Project. All they needed to do was use the Oxygen XML Editor, which is why I wrote this blog post.

For example, I had them use the same sample XML file from the old blog post (shown below) with one change. The encoding value needs to change from latin1 (ISO-8859-1) to unicode (UTF-8). Then, they should put it into a local Windows directory (mine went into the …

[Read more]
Loading Arbitary XML documents into MySQL tables with p_load_xml

Many years ago, I wrote about importing XML data into MySQL using ExtractValue(). The reason I'm revisiting the subject now is that I recently received an email request in relation to my old blog post:

I came across one of your blogs on importing XML data to MySQL using ExtractData() and I am trying to do the same using MySQL (5.5) database. However, I am new to this kind of method and would like to seek your expertise on this.

I have an XML file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
 <wovoml xmlns="http://www.wovodat.org"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 version="1.1.0" xsi:schemaLocation="http://www.wovodat.org phread2.xsd">
 <Data>
 <Seismic>
 <SingleStationEventDataset>
  <SingleStationEvent code="VTAG_20160405000000" owner1="169" …
[Read more]
Secondary Indexes on XML BLOBs in MySQL 5.7

When storing XML documents in a BLOB or TEXT column there was no way to create indexes on individual XML elements or attributes. With the new auto generated columns in MySQL 5.7 (1st Release Candidate available now!) this has changed! Let me give you an example. Let's work on the following table:

 mysql> SELECT * FROM country\G  
 *************************** 1. row ***************************  
 docid: 1  
  doc: <country>  
     <name>Germany</name>  
     <population>82164700</population>  
     <surface>357022.00</surface>  
     <city name="Berlin"><population></population></city>  
     <city …
[Read more]
Getting XML and HTML output.

Many people use MySQL in the console to execute a simple command, but did you know that MySQL can format the result of the query directly to XML or html?

The option -X will output the query result as XML
-H can be used to generate a HTML table containing the data.

$ mysql -X -e "select * from test" test
<?xml version="1.0"?>

152710

Output as HTML

$ mysql -H -e "select * from test" test

test
152710
Linux Documentation Writer Wanted!

The Oracle Linux and Virtualization Documentation Team is seeking an experienced Technical Writer
with a focus on writing documentation for the Oracle Linux product. (The MySQL Documentation Team is part of that group as well.)

Applicants should be located in either Ireland, the UK, Sweden, Norway, …

[Read more]
Linux Documentation Writer Wanted!

The Oracle Linux and Virtualization Documentation Team is seeking an experienced Technical Writer
with a focus on writing documentation for the Oracle Linux product. (The MySQL Documentation Team is part of that group as well.)

Applicants should be located in either Ireland, the UK, Sweden, Norway, …

[Read more]
SOAP web services with iOS

Fresh on the codecentric blog is my new post about using SOAP web services from an iOS client application.

It features a short comparison of the current state of frameworks and tools with the Java world, and then focusses on the sudzc open source library that takes a very interesting approach in generating web service client artifacts by transforming the service's WSDL into Objective-C classes using XSL transformations.

The post is available in German as well.

Guidelines for generating XML

Over the last little while I've come across quite a few XML feed generators written in PHP, with varying degrees of 'correctness'. Even though generating XML should be very simple, there's still quite a bit of pitfalls I feel every PHP or (insert your language)-developer should know about.

1. You are better off using an XML library

This is the first and foremost rule. Most people end up generating their xml using simple string concatenation, while there are many dedicated tools out there that really help you generate your own XML.

In PHP land the best example is XMLWriter. It is actually quite easy to use:

  1. <?php
  2.  
  3. $xmlWriter = new XMLWriter();
  4. $xmlWriter->openMemory();
  5. $xmlWriter->startDocument('1.0','UTF-8');
  6. $xmlWriter->startElement('root'); …
[Read more]
Breaking news: SHOW INNODB STATUS ported to XML

If you’re like me, you’ve gotten tired of writing endless test cases for parsers that can understand the thousands of variations of text output by SHOW INNODB STATUS. I’ve decided to solve this issue once and for all by patching MySQL and InnoDB to output XML, the universal markup format, so tools can understand and manipulate it easily. Here’s a sample snippet:

<status><![CDATA[
=====================================
100320 15:46:24 INNODB MONITOR OUTPUT
=====================================
... text omitted, but you get the idea ...
]]>
</status>

PS: Yes, this is a late April Fool’s joke.

Related posts:

  1. Don’t forget about SHOW PROFILES It seems t
[Read more]
Showing entries 1 to 10 of 35
10 Older Entries »