Tema: Re: ORA XML DB
Autorius: rl
Data: 2009-10-12 10:28:28
SELECT xmltype('<?xml version="1.0" encoding="UTF-8"?>' || chr(10) ||
                xmlelement("foo",
                xmlattributes('atr1value' AS "atr1"),
                'abc')
               ) from dual

rr wrote:
> beja gal kas zino kaip turint
> 
> xmlelement'a tiesiog prideti jam attribute'a?
> na pvz turiu XMLType(<foo>abc</foo>) kaip jam dadeti atributa 
> atr1="atr1value"?
> 
> 
> 
> "rr" <me@you.us> wrote in message news:haufn6$khs$1@trimpas.omnitel.net...
>> Sveiki,
>>
>> gal kas gali padeti tokioje situacijoje
>>
>> turiu 3 kintamuosius nodeName, attrValue, nodeValue
>> kaip gauti <nodeName bilekas="attrValue">nodeValue</nodeName>  ??
>> nenoriu naudoti dbms_'u
>>
>> problema, kad XMLElement reikia nurodyti name'a kaip konstanta (o gal 
>> klystu)?
>> t.y. XMLElement(nodeName, XMLAttributes( attrValue as "bilekas"), 
>> nodeValue) nepraina, gal ko nzn?
>>
>> bandziau:
>> SYS_XMLGEN(nodeValue, XMLFormat(nodeName)) bet nzn kaip ideti attributa?
>>
>> is anksto aciu
>>
> 
>