Data Serialization

I have a data file that I am trying to read into a program. The format looks very familiar, but I haven't quite been able to figure out what it is. Unfortunately it has become one of those situations where I am chasing my own tail. Could anyone identify this for me.

<Title1>
item1="some value"
item2= 1234
</Title1>
<Title2>
item1="another value"
item2="more values"
</Title2>

Thank you.

Is it PHP? I don't have much experience there but it resembles it. It definitely looks like some language for the web.
It's not PHP, PHP looks nothing like that. It doesn't look like any language I've ever come across. It looks like the demon spawn of HTML and INI.
http://www.w3schools.com/php/php_ajax_database.asp

There's some similarities. I've never touched PHP though, so you're probably right.
In that example it's being embedded in a HTML file, which you do like this:
1
2
3
4
<?php
    /* PHP code goes here.
     */
?>

And being used to generate HTML, which you do like this:
1
2
3
4
5
6
7
8
9
10
<html>
    <head>
        <title> Page title </title>
    </head>
    <body>
        <?php
            echo "<h1>Title</h1>\n<h2>Sub-title</h2>\n";
        ?>
    </body>
</html>
Last edited on
Aah I see. My ignorance has bested me again -_-
Originally I did think that it was HTML, then I noticed that the key/values were in INI format. Occasionally in the file, when there are multiple subgroups under one title, it does revert to a more pure INI format.

<Title1>
[Subgroup1]
..
..
[Subgroup2]
..
..
</Title2>

closed account (iw0XoG1T)
are you sure it doesn't look a little more like this:
1
2
3
4
5
<?xml version="1.0"?>
<root>
<Title1 item1="some value" item2="1234"></Title1>
<Title2 item1="another value" item2="more values"></Title2>
</root>


because it looks like xml to me.
You did make me double check, but it is not formatted like xml.
Topic archived. No new replies allowed.