Results 1 to 11 of 11

Thread: [RESOLVED] XML/Schema problem

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Location
    UK
    Posts
    15

    Re: XML/Schema problem

    Well as far as I'm aware when using Visual Studio for XML purposes it doesn't create a 'project' like it does when working with VB for example. They are treated as separate files

    EDIT: Ok, i've looked around and it seems that i didn't quite understand the whole Visual Studio thing. You don't create a project but the files you are working with both have to be imported into the same 'Visual Studio Solution'. Why it can't find the file otherwise is beyond me! Thanks!
    Anyhow, there isn't an error anymore saying that it can't locate the schema but there are a whole load of other errors. Basically for every element that i have declared in my XML document (as attached above) it brings up an error saying it is not declared. What does this mean?
    Last edited by steve_marjoribanks; Nov 21st, 2005 at 11:00 AM.

  2. #2
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: XML/Schema problem

    Visual studio is backward when it comes to individual files and key paired files such as XML Schemas and such........

    Youll avhe to declare each XML element that its in the XML file on the XML schema. Because XML is a text editor all tagas ahve to be declared when using an XML schema to encode/decaode XML or else you get the errors youre getting.

    to be quite honest, I would stop using Visual Studio right now for XML. ITS abag of poo!!

    www.altova.com

    and get the home edition of XMLspy (free). Specialist for XM<L and schemas and such so well up youre street and easier to use. Its the dogs balls for all things XML.

    In the meantime, decale all the elements in teh XML file to the schema and youre away..

    P.S... Rate me!! <cheek!!!>


    Any other probs buzz back

    Kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Location
    UK
    Posts
    15

    Re: XML/Schema problem

    Thanks for that. I'll give XMLSpy a go, i was only really using Visual Basic because i had it on my computer already and the text colouring/line numbering etc is useful!!!
    I don't quite understand what you mean by declare all the elements in the schema though, I thought i had done!

    ps. can't rate you at the moment, it says i've got to spread the love around!!

  4. #4
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: XML/Schema problem

    If its sayig that you not, youll just have to check them all. You probably not closed a tag, declared one along the lines of coding, etc.

    XMLspy is great. this is one of the few office suites that I actually paid the going rate for as we use XML and RSS in alot of our intranet development for P2P amnd busines to business communications arrays and such, and its ACE!!!!! Teh hoem version is real good and only 40 mb, loads of usefull stuff the comes with the enterprise version, and no time limit!!!

    Cheers

    Kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Location
    UK
    Posts
    15

    Re: XML/Schema problem

    Ok, i've installed XMLSpy and I'm now working in that, it seems much better than Visual Studio already so thanks for that!
    However, i am still getting error messages. When i validate the XML document it comes up with an error saying "This file is not valid: Unexpected element 'projectDetails' in element 'GeotechnicalProject'. Expected: projectDetails"

    See if you can work that one out!!!

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Location
    UK
    Posts
    15

    Re: XML/Schema problem

    Well i messed around with the namespaces for a bit and set the elementFormDefault to qualified and it seemed to work, not sure why but still!

  7. #7
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: [RESOLVED] XML/Schema problem

    Great steve!!!!

    Hope you enjoy XMLspt.. Its a great asset to anybodies programming army for XML stuff.

    Good luck

    Kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


Posting Permissions

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



Click Here to Expand Forum to Full Width