Guru: The XML Composition Conundrum of XMLNAMESPACES or XMLATTRIBUTES
April 3, 2017 Michael Sansoterra
Hey, Mike:
After reading the IT Jungle Guru tips on DB2 XML Composition (see Related Stories below), I’ve been able to build XML from relational data. I have everything working but now I need to enclose all data in a “Document” tag after the XML declaration like the example here:
<?xml version="1.0" encoding="utf-8"?> <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://MyCompany.com" xsi:schemaLocation="http://MyCompany.com validate.xsd">
I tried using XMLNAMESPACES but can’t get it to produce the “xsi:schemaLocation” tag. How can I construct the document tag I need?
–N.C.
The problem here is that the xsi:schemaLocation in your example is not a namespace, but …
Read more