Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-11151

Support xpath(‘<>’) for write (especially for SOAPCALL/HTTPCALL but also OUTPUT)


    • Type: Improvement
    • Status: Accepted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ESP, Language
    • Labels:
    • Compatibility:


      The XPATH attribute is used when reading and writing files to indicate the XML markup.

      We currently support the expression XPATH('<>') to allow the programmer to say that the string is to be left "as is" so that it can include embedded XML.

      For example, consider the definition:
      EXPORT AbstractXML := RECORD,MAXLENGTH(100000)
      UNICODE abstract_original


      UNICODE abstract_language


      UNICODE abstract_publisher_copyright


      UNICODE abstract



      When this definition is used with a DATASET(...,XML) function, the abstract field can have embedded XML for subsequent parsing.

      This should work for output as well.

      The instant case that motivates this request is a SOAPCALL where the contents of an attribute were expected to contain a CDATA. For example:
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <a xmlns="http://mynamespace">
      <b type="New""><![CDATA[ Lord & Taylor ]]> </b>

      A note from Tony says "You could argue xpath(‘<>’), which when reading xml means “read all child content as an xml string”, should mean “do not escape xml output” when writing. It would then be symmetrical for read and write. But I don’t think that works currently. You could open an issue to support that… if so you should probably mention SOAPCALL explicitly."




            • Assignee:
              afishbeck Anthony Fishbeck
              johnholt John Holt
            • Votes:
              0 Vote for this issue
              6 Start watching this issue


              • Created: