• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Reverse engineer XML document"

Collapse

  • xchaotic
    replied
    Originally posted by TheRefactornator View Post
    I find the OPs question strange;
    I agree but I think, in case there were better options, OP wouldn't be asking such questions in the first place.

    There are quite a few realistic scenarios where you get XML and get no schema with it (company went bust, proprietary protocol, politics, etc), in such case it's probably worthwhile to try and develop one of your own and perhaps improve it over time.
    One of the benefits, for instance is processing with the Schema-Aware XSL Processor such as saxon - it gives nice performance boost and a lot more useful warnings and errors, when schema awareness is enabled.

    Leave a comment:


  • TheRefactornator
    replied
    Originally posted by basshead View Post
    Just download the schema specified by the SchemaLocation attribute in the document..
    Oh the irony, how we laughed. Yea in theory that's the way, in reality it's a pointless attribute.

    I find the OPs question strange; without a schema the xml can contain anything. As others have advised some tools do exist to infer a schema from a document but that's all they do..infer the schema. It doesn't mean the correct schema is inferred and often it won't be. You could equally just look at the xml document and create your own schema from scratch to match what you think it should look like..and then you'll get it wrong all on your own.

    The owner / source vendor of the xml document needs to confirm the validity and content of the xml document and if they can do that then they should provide a valid schema. If this isn't possible then this sounds like a train wreck waiting to happen to me.

    Leave a comment:


  • xchaotic
    replied
    You might find OxygenXML useful for this as well.
    What's more there's a not very widely used schema language called XDefinition, which basically uses instance documents to describe schema rules and from there you could perhaps move to a more popular one like RelaxNG.
    But in any case what the problem with you having a quick look to see if thee isn't an existing one, or failing that, writing a new one, sort of manually?

    Leave a comment:


  • lightng
    replied
    Originally posted by DimPrawn View Post
    You won't get a very good schema that way.

    It's like trying reverse engineer someones arsehole from a turd.

    But if you must:

    http://msdn.microsoft.com/en-us/xml/bb190622.aspx

    Inference tool
    Bookmarked. Nice find.

    Leave a comment:


  • basshead
    replied
    Just download the schema specified by the SchemaLocation attribute in the document..



    Originally posted by DimPrawn View Post
    It's like trying reverse engineer someones arsehole from a turd.
    That analogy is a bit too close for comfort

    Leave a comment:


  • suityou01
    replied
    Originally posted by DimPrawn View Post
    You won't get a very good schema that way.

    It's like trying reverse engineer someones arsehole from a turd.

    But if you must:

    http://msdn.microsoft.com/en-us/xml/bb190622.aspx

    Inference tool
    Too good mate.

    <wiping coffee from monitor while one hand typing>

    Leave a comment:


  • suityou01
    replied
    Originally posted by voodooflux View Post
    O'rly?

    Try again.
    The swines!

    Leave a comment:


  • voodooflux
    replied
    Originally posted by suityou01 View Post
    Site down.

    Next.
    O'rly?

    Try again.

    Leave a comment:


  • DimPrawn
    replied
    Originally posted by suityou01 View Post
    Does anyone know of a good tool for reverse engineering an XML document to get the schema?

    TIA
    You won't get a very good schema that way.

    It's like trying reverse engineer someones arsehole from a turd.

    But if you must:

    http://msdn.microsoft.com/en-us/xml/bb190622.aspx

    Inference tool
    Last edited by DimPrawn; 22 May 2009, 10:53.

    Leave a comment:


  • suityou01
    replied
    Originally posted by voodooflux View Post
    XMLSpy rings a bell.
    Site down.

    Next.

    Leave a comment:


  • voodooflux
    replied
    XMLSpy rings a bell.

    Leave a comment:


  • suityou01
    started a topic Reverse engineer XML document

    Reverse engineer XML document

    Does anyone know of a good tool for reverse engineering an XML document to get the schema?

    TIA

Working...
X