Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: XML Invoices

  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    152
    Thanks
    5
    Thanked 0 Times in 0 Posts

    XML Invoices

    This is a side thought on my other post regarding the invoicing system:

    If I do write a program that saves invoices in XML format, I will need some sort of common structure to these invoices. Is there a way outside of my head that I can define this structure, say if a third party application was developed? I am aware of things like XSD, but only in terms of SOAP. What would my options be here? And another side thought: if my invoice format changed sometime down the road (and thus my XML format), how would I ensure that my program/XSD(or other format file) is compatible with both versions?

    Thanks!

    FuZion

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by FuZion View Post
    This is a side thought on my other post regarding the invoicing system:

    If I do write a program that saves invoices in XML format, I will need some sort of common structure to these invoices. Is there a way outside of my head that I can define this structure, say if a third party application was developed? I am aware of things like XSD, but only in terms of SOAP.
    xsd is a general schema specification, soap use xsd but you can use any other format.

    What would my options be here?
    xsd as you said but I recommand relaxng( compact). Read this:

    http://relaxng.org/compact-tutorial-20030326.html

    In my opinion relaxng is more flexible and easy to read/understand and once you have a schema you can convert it from one format to another using tools like trang.

    http://relaxng.org/#conversion

    the only limitation, for trang, is that you can't convert from xsd to other formats.
    trang have the avantage that once you have build a xml file you can extract a schema from it.

    And another side thought: if my invoice format changed sometime down the road (and thus my XML format), how would I ensure that my program/XSD(or other format file) is compatible with both versions?
    compare somehow schema for both version and if older schema is included in newer one there are compatible.

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •