Tag Info

New answers tagged

1

Like others, I will question the need for C++. If you consider JAVA programming, instead of C++ (Meanwhile, I enjoy programming in ANSI-C, but I think your priority is a rapid development, instead of the joy of programming). Please check the site http://www.json.org/java/ Actually http://www.json.org/java/ might give you also some ideas for C++ libraries. ...


2

From the comments... if everything else you have is C++ then the best answer is to write it in C++, building a mish-mash of different bits of programming languages is a right PitA to maintain and support. So, if you have C++ and need to resolve XML to JSON, it seems obvious to use the xml2json library that you linked to. It comes with sources so you can ...


0

To improve performance and simulate multiple nodes with regardless of its XML size, you can use XSLT with XML and then use xpath to retrieve nodes. This would be much better.


2

In the first case, you'll have to either create a lookup or to loop through the tags to find a specific tag. In the second case, .NET Framework does that for you when processing the XML file. For instance, if you want to find multiple times (and by multiple, I mean a lot) whether a requirement has a specific tag, the second case usage will be ...


1

Use XML if your data is a lot more nested and complicated than this. In this particular case I would suggest using JSON (if you cannot use relational databases as you have mentioned yourself). As for learning JSON it is very simple. There is nothing to it but learning the structure. Once you got the structure down you can pretty much create any type of ...


1

You will never get the benefits of a simpler parser or standard XML tools on the client side anyway. There are billions of pages on the web in HTML, some of them are written by people long dead, so they are never going to be updated to XML. So if you want to create a generally useful user agent you have to be able to parse old fashioned HTML anyway. ...


3

In computer science, type safety is the extent to which a programming language discourages or prevents type errors. Type safety is not an absolute attribute. It is not boolean. Languages (and XML and JSON are languages) allow and prevent different kinds of errors and mistakes. For example you can misname elements. But you cannot skip required syntactic ...


20

XML can be type safe, since it it possible with XSD schemas to declare the data type of elements. A document validated against a XSD schema is guaranteed to conform to the expected types. But a XML format is not required to have a schema, so a document is not automatically type safe just by being XML. There actually exist a schema language for JSON also, so ...


36

Because of the XML Schema Definition (XSD). With XML, you can have an additional file which describes the schema. It indicates, for example, that the element /a/b is an array and contains from 1 to 10 elements, or that the element /a/c is an integer. You can find an example of an XSD here. Validation of a given XML file through an XSD is supported by many ...


3

Why can't you use the same structure as in your bullets? <topLevelTag> <item id="1"> <value>ItemName</value> <category level="primary">foo</category> <category level="secondary">bar</category> </item> <item id="2"> <value>ItemName</value> ...



Top 50 recent answers are included