Author |
Message
|
cmmatei |
Posted: Tue Apr 24, 2007 7:07 am Post subject: modify XmlDecl |
|
|
 Apprentice
Joined: 06 Feb 2006 Posts: 26 Location: PARIS/NEW YORK
|
I would like to modify the xml declaration of an xml file.
I need to have
<?xml version = '1.0' encoding = 'UTF-8'?>
instead of
<?xml version = "1.0" encoding = "UTF-8"?>
for compatibility with old versions of applications partners.
Message domain is XML.
If I modify XmlDecl using the followings
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
the result is " and not '.
How can I obtain ' ?
Thank you for tou help.
Cornel |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 24, 2007 9:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
First off, unless you're using 2.1, you should not be using XML domain, you should be using XMLNS or XMLNSC.
And if you're using 2.1, not only are you not supported any more, I'm going to bet that you can't do this - at least while treating the XML data as XML data.
I don't know of a particular way in XMLNS or XMLNSC to control this either.
Maybe someone who keeps the XML spec in their bookmarks will have something to contribute.
If I *had* to solve this problem, I would probably end up processing the data as a bitstream. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
cmmatei |
Posted: Tue Apr 24, 2007 10:45 pm Post subject: |
|
|
 Apprentice
Joined: 06 Feb 2006 Posts: 26 Location: PARIS/NEW YORK
|
So even in v6 we are not full XML compliant ...
I'll see what can be done using BISTREAM.
Thank you, |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 25, 2007 4:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
cmmatei wrote: |
So even in v6 we are not full XML compliant ... |
I didn't say that. I said I didn't know of a way to change this...
I don't know everything, and I also didn't look very hard. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
cmmatei |
Posted: Tue May 15, 2007 11:48 am Post subject: |
|
|
 Apprentice
Joined: 06 Feb 2006 Posts: 26 Location: PARIS/NEW YORK
|
I followed your advice and did:
DECLARE blobQuote CONSTANT BLOB X'3c3f786d6c2076657273696f6e203d2027312e302720656e636f64696e67203d20275554462d38273f3e';
DECLARE blobGuillemets CONSTANT BLOB X'3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e';
SET "OutputRoot"."BLOB"."BLOB" = blobQuote||SUBSTRING("InputRoot"."BLOB"."BLOB" FROM 39);
Sincerely yours,
Cornel |
|
Back to top |
|
 |
|