- Fixed issue with XML Data Binder Wizard whitespace padding rules.
- Fixed issue in Data Mapper with JSON node mapping.
- General Fixes.
https://www.liquid-technologies.com/trial-download
Liquid XML is the ultimate XML Development and Data Transformation Environment including Graphical XSD Editor, JSON Schema Editor, XML Editor, JSON Editor, WSDL Editor, XML Diff tool, Web Service tools and the worlds most advanced XML Data Binding tool to generate C++, C#, Java, VB .Net and Visual Basic 6 code from your XML Schema (XSD, XDR, DTD).
// create an instance of the class to load the XML file into Bookstore elm = new Bookstore(); // load the initial XML data from a file into the object elm.FromXmlFile(filename); // change the price of the first book to 10.99 elm.BookCol[0].Price = 10.99; // extract the updated data into an XML string string strXml = elm.ToXml(); Console.WriteLine($"The XML created\n{strXml}"); // extract the updated data into a JSON string string strJson = elm.ToJson(); Console.WriteLine($"The JSON created\n{strJson}");
// create an instance of the class to load the XML file into CBookstorePtr spElm = CBookstore::CreateInstance(); // load the initial XML data from a file into the object spElm ->FromXmlFile(lpctFilename); // change the price of the first book to 10.99 spElm->GetBookCol()->Item(0)->SetPrice(10.99); // extract the updated data into an XML string std::tstring strXml = spElm ->ToXml(); _tprintf(_T("The XML created\n%s"), strXml.c_str()); // extract the updated data into a JSON string std::tstring strJson = spElm ->ToJson(); _tprintf(_T("The JSON created\n%s"), strJson.c_str());
<bs:bookstore xmlns:bs="http://www.liquid-technologies.com/sample/bookstore"> xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"> <bs:book price="10.99" publicationdate="2008-10-20" ISBN="978-0747596837"> <bs:title>The Graveyard Book</bs:title> <bs:author> <bs:first-name>Neil</bs:first-name> <bs:last-name>Gaiman</bs:last-name> </bs:author> <bs:genre>Horror</bs:genre> </bs:book> ... etc ... </bs:bookstore>
{ "bs:bookstore": { "@xmlns:bs": "http://www.liquid-technologies.com/sample/bookstore", "@xmlns:xs": "http://www.w3.org/2001/XMLSchema-instance", "bs:book": [ { "@price": 10.99, "@publicationdate": "2008-10-20", "@ISBN": "978-0747596837", "bs:title": "The Graveyard Book", "bs:author": { "bs:first-name": "Neil", "bs:last-name": "Gaiman" }, "bs:genre": "Horror" }, ... etc ... ] } }
SerializationContext.Default.JsonContext.SupportRoundtrip = JsonContext.RoundTrip.None;
CSerializationContext::GetDefaultContext().GetJsonContext().SetSupportRoundtrip(JsonRoundTrip_None);
{ "bookstore": { "book": [ { "price": 10.99, "publicationdate": "2008-10-20", "ISBN": "978-0747596837", "title": "The Graveyard Book", "author": { "first-name": "Neil", "last-name": "Gaiman" }, "genre": "Horror" }, ... etc ... ] } }