XML

About this tag

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.

Learn more

Subscribe to XML content with RSS Syndicate content or email

Problem:

I want to be able to import XML (say, using %XML.Reader) to Caché objects permissively (ignoring invalid/unexpected tags/attributes), but also to validate the same XML and list any/all invalid tags/attributes that it contains.

Last answer 12 December 2017 Last comment 12 December 2017
2
1

answers

2

comments

154

views

+ 1

rating

I'm using %SOAP.WebRequest to send SOAP requests:

  1. Populate %SOAP.WebRequest object (by setting Request and HeadersOut properties)
  2. Call SendSOAPBody method to send request

Currently the XML I send looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
  <SOAP-ENV:Header>
<SomeCustomHeader/>  </SOAP-ENV:Header>
  <SOAP-ENV:Body><SomeCustomBody/></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

However, I want XML to be generated differently:

  • No new lines
  • No whitespaces between <SomeCustomHeader/> and </SOAP-ENV:Header>

 

How can I tweak XML generation to achieve that?

Last answer 14 June 2017 Last comment 14 June 2017
5
2

answers

4

comments

140

views

0

rating

This is a translation of the following article. Thanks @Evgeny Shvarov  for the help in translation.

Let's assume that you wrote a program that shows "Hello World!", for example:

  write "Hello, World!"

The program works and everyone is happy.

With time, however, your program becomes more complex, gets more features and you eventually need to show the same string in different languages. Moreover you don't know the number and names of these languages.

The spoiler below contains a description of how the task of multi-language localization is solved in Caché.

Last comment 20 May 2017
1
1

comments

172

views

+ 7

rating