• 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!

Reverse engineer XML document

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    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.
    Moving to Montana soon, gonna be a dental floss tycoon

    Comment


      #12
      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.

      Comment

      Working...
      X