Appreciate the feedback. As in many projects, some things are being decided by other people. I'm just trying to get a handle on what to expect. If it has to be done this way, it has to be done this way .
Past projects have exchanged data between devices using binary. This has disadvantages - byte swapping issues, messages tied to data structures, etc.
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
It is valid -- but, the creator of the XSD did not indicate that it was required -- and you have assumed that it is required. If your code cannot tolerate that -- then modify the XSD to make it required and have whoever produces the XML give it a default value....
However, this is simply pushing it off to the side. This is an issue that does not relate to XML per se -- it relates to best practices about defining and validating data.
The XSD defines the structure and rules of XML -- so the designer of the schema must describe the data perfectly and consumers must not make assumptions that are not supported by the XSD.
<list type="expl" margin="0">
(1) A person
is guilty of an offence if:
<list type="expl" margin="0">
person deals with money or other property; and
The output i need is like
<text>A person is guilty of an offence if:</text>
<text>the person deals with money or other property; and</text>
Effectively if List appears as consecutive siblings, and they are of different types (eg, (1)/(a)/(i)) they must be nested inside the previous list item.
This is not the document you want for figuring out CRUD. You need the XSD to do that properly. You could guess and as long as the database column names matched you *might* be able to guess correctly, but...I would not be helping you if I recommended that you do that.
If you can write your own query to select a row and if you also had access to ADO.NET -- you could have the table tell you its schema and then the query could be written properly.
This method that you are using -- is not a great idea -- you can have some success in doing it, but not for long and it is very likely that you will manage to put a row in the database that will be junk data because you do not know the schema -- you are just making blind CRUD operations.
A better choice might be stored procedures because you can just provide the parameters from the client side. At any rate, the less you count on being smart on the client side, the better off you will be.
i want to display some of the questions stored in an xml file on a listbox in wpf,only one questions should be displyed on listbox by using a button,it shows different questions each time whenever i press next button,please send me code for this
OK, I'd be first to post a link to Parsing Html The Cthulhu Way [^] if anyone suggests Regular Expressions, but I have a problem using an XmlDocument (and therefore XPath) with an HTML file I'm downloading.
The page is a list of files to download -- I need to extract the hrefs from the as, obviously I'd prefer to use XPath to do that.
0) The file doesn't contain an opening <HTML> tag (it does have a closing </HTML> tag ) -- I can tack one on, that's not a big deal.
1) It contains at least one entity (and possibly other entities) and the XmlDocument doesn't like that.
So I need options, people!
I can summon Cthulhu.
I can use Regular Expressions to replace any offending entities and then feed the result to an XmlDocument.
Oh, mighty Cthulhu! Wise and terrible! I ask your assistance as my days have been blighted with some gnarly HTML! Please, oh lord, come smite the bare buttocks of the wretch who hast wrought this travesty. I will repay you with a pint of bitter. Not a measly USian pint mind you, but a proper Britsh pint.
Last Visit: 31-Dec-99 18:00 Last Update: 17-Jun-21 19:44