Create XML using variables (dynamically)
Ive searched and so far not finding results. Can you create an xml file dynamically in AS3.
public class XmlWriter extends MovieClip{
private var myXMLRoot:String;
public function XmlWriter(xmlRootName:String){
myXMLRoot = xmlRootName
public writeXML():{
var temp:XML = new XML(<xmlRootName></xmlRootName> ) //where xmlRootName is the string set when the class is created
is the above possible? If so how would you do it?
var nodeName:String = "myNodeName";
var attributeName:String = "myAttributeName";
var attributeValue:String = "myAttributeValue";
var xml:XML = <{nodeName} {attributeName}={attributeValue} />;
trace(xml.toXMLString());
// output: <myNodeName myAttributeName="myAttributeValue"/>
Similar Messages
-
How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
Hi,
I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
( f.ex. cannot verifying it correct in xmlspy )
my dbms is
NLS_CHARACTERSET = WE8MSWIN1252
NLS_NCHAR_CHARACTERSET = AL16UTF16
NLS_RDBMS_VERSION = 10.2.0.1.0
I do generate it in this matter :
declare
xmldoc CLOB;
ctx number ;
utl_file.file_type;
begin
-- generate fom xml-view :
ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
DBMS_XMLGEN.setRowSetTag(ctx, null);
DBMS_XMLGEN.setRowTag(ctx, null );
DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
-- create xml-file:
xmldoc := DBMS_XMLGEN.getXML(ctx);
-- put data to host-file:
vblob_len := DBMS_LOB.getlength(xmldoc);
DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
UTL_FILE.put_line(bHandle, vbuffer, FALSE);
UTL_FILE.fclose(bHandle);
end ;
maybe while work UTL_FILE there is a change the encoding ?
How can this solved ?
Thank you
Norbert
Edited by: astramare on Feb 11, 2009 12:39 PM with database charsetsMarco,
I tryed to work with dbms_xslprocessor.clob2file,
that works good,
but what is in this matter with encoding UTF-8 ?
in my understandig, the xmltyp created should be UTF8 (16),
but when open the xml-file in xmlSpy as UTF-8,
it is not well ( german caracter like Ä, Ö .. ):
my dbms is
NLS_CHARACTERSET = WE8MSWIN1252
NLS_NCHAR_CHARACTERSET = AL16UTF16
NLS_RDBMS_VERSION = 10.2.0.1.0
-- test:
create table nh_test ( s0 number, s1 varchar2(20) ) ;
insert into nh_test (select 1,'hallo' from dual );
insert into nh_test (select 2,'straße' from dual );
insert into nh_test (select 3,'mäckie' from dual );
insert into nh_test (select 4,'euro_€' from dual );
commit;
select * from nh_test ;
S0 S1
1 hallo
1 hallo
2 straße
3 mäckie
4 euro_€
declare
rc sys_refcursor;
begin
open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
end;
( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
open in xmlSpy is:
<?xml version="1.0"?>
<ROWSET>
<ROW>
<S0>1</S0>
<S1>hallo</S1>
</ROW>
<ROW>
<S0>2</S0>
<S1>straޥ</S1>
</ROW>
<ROW>
<S0>3</S0>
<S1>m㢫ie</S1>
</ROW>
<ROW>
<S0>4</S0>
<S1>euro_</S1>
</ROW>
</ROWSET>
regards
Norbert -
I am struggling to learn to create queries(using variables)
Hi all,
I am struggling to learn to create queries(using variables)
I want to learn from basics to all existing technics.
(eg of each variable types and process types).
if you have any docs please mail to <REMOVED>.
thanks,
BW Chetacheck these links.
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
http://help.sap.com/saphelp_nw04/helpdata/en/3f/89533e5ff4d064e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/content.htm
http://help.sap.com/search/highlightContent.jsp
http://help.sap.com/saphelp_nw04s/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
thanks
kevin. -
Dynamically creating XML using Sap-xMII Colum and Row Action Block
Hi,
I am trying to create a xMII-format XML using IlluminatorDocument Action Block.
My problem statement is during run time I am required to create columns on the fly.which I have done using xMII Colum Action block.but now I am required to assing values to these dynamically created columns.I have tried using Data Item and Row action block but am not sucessful in doing so.Can anyone help in creating this xml Dynamically.
The steps that I have followed is
defined
tagquery action block and defined tagquery
blank Illuminator Document Action block
put a repeater on result of tag query
set a counter
updated the counter
used column action block and mapped the column name i.e IlluminatorColumn_0.Name------"test"&Local.count
my column output looks like
Rowsets DateCreated="2007-03-27T12:59:39" EndDate="2007-03-27T11:42:40" StartDate="2007-03-27T11:42:40" Version="11.5.0">
<Rowset>
<Columns>
<Column Description="" MaxRange="100" MinRange="0" Name="test1" SQLDataType="1" SourceColumn="test1"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test2" SQLDataType="1" SourceColumn="test2"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test3" SQLDataType="1" SourceColumn="test3"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test4" SQLDataType="1" SourceColumn="test4"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test5" SQLDataType="1" SourceColumn="test5"/>
</Columns>
</Rowset>
</Rowsets>
after this action block i want to assign values to each column i.e
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
i.e erach row tags should be filled with columntag and value
but i am not able to achieve the same
Can anyone help me doing thisAfter adding IllumColum Action block I have created 5 columns dynamically
but now I am unable to add row.
currently for everycolumn created it is giving one row without any column node
the configurations that I have done in Data Item Action Block is
In My Link Editor
IlluminatorColumn_0.Name----
>IlluminatorDataItem_0.Name
hardcoded the value i.e 20----
>IlluminatorDataItem_0.Value
IlluminatorDocument_0.Output----
>IlluminatorDataItem_0.IlluminatorDocument
current resultset I am getting is
<?xml version="1.0" encoding="UTF-8"?>
<Rowsets DateCreated="2007-03-27T12:59:39" EndDate="2007-03-27T11:42:40" StartDate="2007-03-27T11:42:40" Version="11.5.0">
<Rowset>
<Columns>
<Column Description="" MaxRange="100" MinRange="0" Name="test1" SQLDataType="1" SourceColumn="test1"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test2" SQLDataType="1" SourceColumn="test2"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test3" SQLDataType="1" SourceColumn="test3"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test4" SQLDataType="1" SourceColumn="test4"/>
<Column Description="" MaxRange="100" MinRange="0" Name="test5" SQLDataType="1" SourceColumn="test5"/>
</Columns>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
</Rowset>
</Rowsets> -
Dynamically creating file using variable
HI, i am facing an issue in creating file on run time using variable.
i have a variable FileName. In refresh tab i have written a query like SELECT TO_CHAR(SYSDATE,'YYYY,MM,DD') || 'TEST' FROM DUAL. i tested the variable and its value is correct.
i have created an interface to extract the data from table and store it in file. i have assigned variable FileName to the file.
Now when i run the interface...the file is created but the header is created in different file and its name is ambiguous e,g(19) and the data is placed in other file with the name which is the value of variable FileName.....
ISSUE is two ODI creates two files one for header only and other for data....
when i run my interface in a package the file created perfectly ..... but i dun want to use package i want to create file through running interface onlyone file name is some number like 19.txt and other filename is 20121211_TEST.txt (this name is coming from variable).....
however when i create a package with variable and interface,only one file is created 20121211_TEST.txt (header and data are not created in separate files.)
create header (ID,
NAME,
DEPT)
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=TARGET_FILESNP$CRLOAD_FILE=*E:\tempProj/19*SNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x007eSNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=NAMESNP$CRTYPE_NAME=STRINGSNP$CRORDER=2SNP$CRLINE_OFFSET=51SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DEPTSNP$CRTYPE_NAME=STRINGSNP$CRORDER=3SNP$CRLINE_OFFSET=101SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CR$$SNPS_END_KEY*/
Edited by: 975356 on Dec 11, 2012 10:57 PM
Edited by: 975356 on Dec 11, 2012 10:58 PM -
Create XML using Data Templates
Is anyone familiar will a tool, other than oracle that will create XML from data template definitions.
I trying to understand if the data template definitions are an Oracle specific tool that only Oracle can use to generate XML files.
If this is specific to Oracle, is there an easier way to use the data templates to generate XML without registering them in the concurrent manager, XMLP Admin, and then executing the concurrent process?
I'm looking for a shortcut to testing these files without having to register everything.Why not using XML Publisher Standalone aka Enterprise 5.6.2 ?
There you can generate the XML based on data templates without registering anything. The installation is quite easy.
Juergen -
Creating XML using JCA functionality
dear friends,
I am working on connection of EP to R3 using JCO and JCA architecture.
Using JCO, i could able to create XML file
i.e.,
JCO.Table sales_orders =function.getTableParameterList().getTable("KOMV");
sales_orders.writeXML("F:
usr
crpts
" + request.getUser().getUniqueName() + ".xml");
In the same manner i would like to create XML file using JCA functionality. But i did't found any functionality in any way as my knowledge.
can anybody help me out this
Secondly,
is it possible to create XML file with in the par path?
like instead of desktop F:
usr
crpts
path i would like to use like dist/xml
suggestion required.
Kanthadear friends,
I am working on connection of EP to R3 using JCO and JCA architecture.
Using JCO, i could able to create XML file
i.e.,
JCO.Table sales_orders =function.getTableParameterList().getTable("KOMV");
sales_orders.writeXML("F:
usr
crpts
" + request.getUser().getUniqueName() + ".xml");
In the same manner i would like to create XML file using JCA functionality. But i did't found any functionality in any way as my knowledge.
can anybody help me out this
Secondly,
is it possible to create XML file with in the par path?
like instead of desktop F:
usr
crpts
path i would like to use like dist/xml
suggestion required.
Kantha -
Hi I want to create a xml using JSP For eg I want to create a report
and I want to take all the data required for the report from the user
and want to put all the information in a session and whenever a user
wants to see the html output I should be able to parse the xml file
and show it to user.
I know it is doable but I am confused about storing the data in
session and concerting that data into XML file any help would be
great.
Thanks,
Preeti
Sounds like you might want to look at XML data binding. Something like JAXB
or Castor can create an object that can be turned into XML by merely calling
a single method and probably streamed to Xalan or whatever to create HTML.
However, don't quote me on this - I am having enough troubles with trying to
get the compiled Objects to be as I wish. Basically, they both take your
DTD with an extra file that defines the types to be used in the classes -
i.e. instead of string int might be used - and which tags to turn into
classes and general information such as this about the output of your
classes. You then simply call Unmarshal (for both castor and JAXB) and it
loads the file from the selected input stream into the created object, you
edit the object, what ever - store it on the server... and call Marshal to
get back the xml... as this is all using streams it could be passed to Xalan
for processing i think...
Hope I've helped, and answered your question a little!
"Preeti Sikri" <[email protected]> wrote in message
news:[email protected]...
> Hi I want to create a xml using JSP For eg I want to create a report
> and I want to take all the data required for the report from the user
> and want to put all the information in a session and whenever a user
> wants to see the html output I should be able to parse the xml file
> and show it to user.
>
> I know it is doable but I am confused about storing the data in
> session and concerting that data into XML file any help would be
> great.
>
> Thanks,
> Preeti
-
hi,
i want to know if the following is possible using EJB and XML.
using HTML/javascript, a form has been created. now the user makes selections using the form. i want to create a XML file that encapsulates the user selections ie this XML file should contain the selections made by the user. this XML file should also automatically change whenever the user makes new selections on the HTML form.
someone suggested me that Beans are the best option to use. can u guide me on how to proceed using Beans.
thanks in advance.Why not use a JSP? Much quicker.
(When someone suggested you use Beans, I doubt they meant Enterprise Beans - cf. SledgeHammer vs Nut). -
Hello,
I want to creat XML document using Dom and XPath, as per my knowledge goes I can't create it using XPath {I may b wrong, if I am then pls tell me know :-) }.
If there doesn't exists any thing like this I am thinkin of wrapping a class {say its XPathProcesserDom} which takes the XPath querry and internaly creates XML Document and returns on request. Is this a good idea :-)
waiting for comments :-)....
thanks and regards,
MaheshPujariHi Piyush
I don't see how you can create a XML document via xpath!?!? xpath it's only used to reference data in an XML document...
Chris -
Stored Proc to create XML (using nested cursors)?
From previous posts and from the
documentation for XSQL I have
discovered the joys of the
CURSOR operator to create
nested tables: i.e:
SELECT dname,
CURSOR (SELECT ename, sale....) as employees
FROM dept
However, I can not find any other
documentation on how to program (PL/SQL)
this functionality.
I would like to use XSQL as
it is exactly what I need, but
I can not because my client does
not want to use Java and they
require IIS, but do not want to
use JRUN, etc... (I tried this
first).
Since I only need to do an XML
dump to a variable for processing
by other parts of the program, life
is fairly easy. I have already done
this using Microsoft Data Shapes in
VB (client does not want VC++ either...)
However this was slow.
In order to speed things up I want to
create a stored procedure in Oracle to
dump out the XML hierarchy to a variable given
an SQLQuery input. If I use
nested CURSORS this should be very easy.
I would like to create a recursive PL/SQL
function to handle this, but I have the
following questions:
1) I want the function to have an
input of an open cursor,
My plan is to detect the column
type, when it is a nested cursor
I would recurse with the open cursor
to handle the nested cursor.
2) I can not find a reference on to
programatically handle "untyped collections
based on an SQL statement" in anything
other than the XSQL documentation.
I am assuming that I can detect the
column type of nested cursor somehow
and then recurse on this to handle
dump the recordset to an XML tagset.
But I wuold like to find some documentation
or examples on the calls, type statements,
etc....I think the CURSOR() thing is an invention of the XSQL Servlet; not available elsewhere.
You can accomplish nesting via user defined types and object views, using the "cast(multiset())" syntax, which is not documented particularly well either. This does require some setup, and so is not particularly dynamic. -
Create XML using data from Oracle
Other than using OracleXMLQuery, how do I create an XML file from the data from a table in Oracle?
Rgds,
SeeteshVetsrini:
Thanks for your response. I no longer can receive email at [email protected], because I am at a different company now. So please post directly to this forum so I can receive my messages.
I would imagine that "look ahead" is a feature needed by many applications, since the heading of a document may depend on the data within. In my case, we have a Pack Slip that we want the bold heading title to change if the word "FAX" is inside the body of the document. Instead of saying "Pack Slip", it would say "Fax Pack Slip".
Any hints would be greatly appreciated.
Regards,
Rich Locus -
Creating XML using DBMS_XMLGEN with a namespace
Is it possible to create an XMLTYPE using the DBMS_XMLGEN function set that contains a namespace. As far as I can see only the 'setrowsettag' function allows any control over what goes into the root element - should I be including, for example, an attribute called 'xmlns' with a value?
The reason I ask all this is I'm trying to validate xml created from a select statement against a registered xsd.
The xsd I've registered:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<xs:schema targetNamespace="http://www.sepa.org/2007/XMLSchemas/Site" xmlns:sit="http://www.sepa.org/2007/XMLSchemas/Site" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sepa.org/2007/XMLSchemas/Site Site.xsd" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="311" oraxdb:schemaURL="http://www.sepa.org/2007/XMLSchemas/Site.xsd" oraxdb:schemaOwner="XMLDBMASTER" oraxdb:numProps="14">
<xs:element name="site" oraxdb:propNumber="5953" oraxdb:global="true" oraxdb:SQLName="site" oraxdb:SQLType="site1681_T" oraxdb:SQLSchema="XMLDBMASTER" oraxdb:memType="258" oraxdb:defaultTable="site1683_TAB" oraxdb:defaultTableSchema="XMLDBMASTER">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType oraxdb:SQLType="site1681_T" oraxdb:SQLSchema="XMLDBMASTER">
<xs:sequence>
<xs:element name="SiteIDType" type="xs:ID" oraxdb:propNumber="5940" oraxdb:global="false" oraxdb:SQLName="SiteIDType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="SiteNameType" type="xs:string" minOccurs="1" oraxdb:propNumber="5941" oraxdb:global="false" oraxdb:SQLName="SiteNameType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="SiteAddressStructure" oraxdb:propNumber="5947" oraxdb:global="false" oraxdb:SQLName="SiteAddressStructure" oraxdb:SQLType="SiteAddressStructure1682_T" oraxdb:SQLSchema="XMLDBMASTER" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false">
<xs:complexType oraxdb:SQLType="SiteAddressStructure1682_T" oraxdb:SQLSchema="XMLDBMASTER">
<xs:sequence>
<xs:element name="AddressLine1" type="xs:string" minOccurs="1" oraxdb:propNumber="5942" oraxdb:global="false" oraxdb:SQLName="AddressLine1" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="AddressLine2" type="xs:string" minOccurs="0" oraxdb:propNumber="5943" oraxdb:global="false" oraxdb:SQLName="AddressLine2" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="AddressLine3" type="xs:string" minOccurs="0" oraxdb:propNumber="5944" oraxdb:global="false" oraxdb:SQLName="AddressLine3" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="AddressLine4" type="xs:string" minOccurs="1" oraxdb:propNumber="5945" oraxdb:global="false" oraxdb:SQLName="AddressLine4" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="PostCode" type="xs:string" minOccurs="0" oraxdb:propNumber="5946" oraxdb:global="false" oraxdb:SQLName="PostCode" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SiteTelephoneNoType" type="xs:string" minOccurs="0" oraxdb:propNumber="5948" oraxdb:global="false" oraxdb:SQLName="SiteTelephoneNoType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="SiteMobilePlantType" type="xs:string" minOccurs="0" oraxdb:propNumber="5949" oraxdb:global="false" oraxdb:SQLName="SiteMobilePlantType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="SiteFaxNoType" type="xs:string" minOccurs="0" oraxdb:propNumber="5950" oraxdb:global="false" oraxdb:SQLName="SiteFaxNoType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<!--***Location code must reference the code in the Location Dataset***-->
<xs:element name="SiteLocationCode" type="xs:string" minOccurs="1" oraxdb:propNumber="5951" oraxdb:global="false" oraxdb:SQLName="SiteLocationCode" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
<xs:element name="SitePopulationEquivType" type="xs:positiveInteger" minOccurs="0" oraxdb:propNumber="5952" oraxdb:global="false" oraxdb:SQLName="SitePopulationEquivType" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The method for generating the XML:
DECLARE
v_ctx DBMS_XMLGEN.ctxhandle;
v_xml XMLTYPE;
BEGIN
v_ctx:=DBMS_XMLGEN.newcontext
SELECT e.site_id "SiteIDType", e.site_name "SiteNameType", sit_address(e.addr_line1, e.addr_line2,
e.addr_line3, e.addr_line4, e.post_code) AS "SiteAddressStructure", e.tel_no "SiteTelephoneNoType"
, e.mobile_plant "SiteMobilePlantType",
e.fax_no "SiteFaxNoType", e.ge1_location_code "SiteLocationCodeType" ,e.population_equivalent "SitePopulationEquivType"
FROM EL03_SITES e
WHERE e.site_id = 15'
DBMS_XMLGEN.setrowsettag (v_ctx, 'site');
DBMS_XMLGEN.setrowtag (v_ctx, NULL);
v_xml := DBMS_XMLGEN.getxmltype (v_ctx);
INSERT INTO js_xml_test
(ID, xml_data
VALUES ('site test', v_xml
COMMIT;
DBMS_XMLGEN.closecontext (v_ctx);
END;
The resulting XML:
<site>
<SiteIDType>15</SiteIDType>
<SiteNameType>Finlas Water Treatment Works</SiteNameType>
<SiteAddressStructure>
<AddressLine1>Finlas Water Treatment Works</AddressLine1>
<AddressLine2>Shermor Farm</AddressLine2>
<AddressLine3>Luss</AddressLine3>
<AddressLine4>Alexandria</AddressLine4>
<PostCode>G83 8RH</PostCode>
</SiteAddressStructure>
<SiteTelephoneNoType>01389 850224</SiteTelephoneNoType>
<SiteMobilePlantType>N</SiteMobilePlantType>
<SiteLocationCodeType>123428</SiteLocationCodeType>
</site>
When I try to validate it, I get:
ORA-30937: No schema definition for 'site' (namespace '') in parent '/'
ORA-06512: at "SYS.XMLTYPE", line 345
ORA-06512: at line 30
How do I get a namespace declaration in the XML? Any suggestions gratefully received.Did you change any of the text in the lob write statements ?
I believe you get this error if you increase the number of characters without increasing the 1st argument which looks as though it represents the number of characters -
I am trying to create and send an XML file back to browser where XSL will be
applied. I am using wl6.0 sp2
I tried like this
<%@ page contentType="text/xml" %>
<%
out.println("<?xml version=\"1.0\"?>") ;
out.println("<books>");
out.println("<title>") ;
out.println("XML Programming") ;
out.println("</title>") ;
out.println("</books>") ;
%>
But the browser is blank.
Thanks
shaikjava
Also, valid XML documents have no whitespace before the <?xml ...?>
declaration.
Sam
"Cameron Purdy" <[email protected]> wrote in message
news:[email protected]...
> There are lots of reasons why the browser could be blank. Judging from the
> JSP you provided below, I could not even begin to guess at what you are
> doing to prevent the browser from working.
>
> > <%
> > out.println("<?xml version=\"1.0\"?>") ;
> > out.println("<books>");
> > out.println("<title>") ;
> > out.println("XML Programming") ;
> > out.println("</title>") ;
> > out.println("</books>") ;
> > %>
>
> Do you mean you did all that when you could have just:
>
> <?xml version="1.0"?>
> <books>
> <title>
> XML Programming
> </title>
> </books>
>
> That is what JSPs are for, after all!!! Don't put markup language inside
> code inside a JSP!!! You're going to give someone a friggin heart attack.
>
> Remember:
> servlets = code
> jsps = raw content
>
> You can put content in servlets by embedding it in the code. You can put
> code in jsps by embedding it in the content.
>
> Peace,
>
> --
> Cameron Purdy
> Tangosol Inc.
> << Tangosol Server: How Weblogic applications are customized >>
> << Download now from http://www.tangosol.com/download.jsp >>
>
>
> "chand" <[email protected]> wrote in message
> news:[email protected]...
> > I am trying to create and send an XML file back to browser where XSL
will
> be
> > applied. I am using wl6.0 sp2
> >
> > I tried like this
> >
> > <%@ page contentType="text/xml" %>
> >
> > <%
> > out.println("<?xml version=\"1.0\"?>") ;
> > out.println("<books>");
> > out.println("<title>") ;
> > out.println("XML Programming") ;
> > out.println("</title>") ;
> > out.println("</books>") ;
> > %>
> >
> > But the browser is blank.
> >
> > Thanks
> > shaikjava
> >
> >
> >
> >
> >
> >
> >
>
>
-
Creating and using variables in LabView
Hello. Apologies in advance for what probably is a trivial task, but I'm having problems grasping the concept of variables in the LabView environment.
I'm using Motion to track the steps that a motor has traversed. I have an inkjet that I want to apply a quick burst only once for a pixel (which I defined the size). The problem is that the motor has to travel at such a slow speed that the inkjet is over the pixel for a while. With my current code, it will keep firing while over the pixel. So I want to store the last pixel number that the printer fired on so I can perform a compare to ensure that the inkjet will only fire once the current pixel is greater than the last-fired pixel.
In a regular text-based coding environment, it's as easy as assigning a variable to store the pixel that the inkjet fired on, then constantly compare the current pixel location to that variable to know if it's still over the same pixel. I'm a bit of a loss trying to accomplish the same task using the graphical coding of LabView.
How do I extract this value and store it for later comparison?
Thank you and sorry again for a dumb question.I assume that you are doing this firing of inkjet at a particular pixel, using a loop ( more appropriately, while loop)
One way to achieve this would be to use shift registers and case structure
Insert a shift register for that loop
initialize a pixel value (numeric) to that shift register
On every iteration, perform comparison for 'greater than' with current pixel value/position to value/position stored in shift register
If the result of this comparison is true, use a case structur. In true case of case structure , fire your inkjet at that particular pixel and update your shift register to replace and store the current value
If the result of comparison was false, do not perform any operation, just pass the shift register through false case without any modification
A labVIEW code built on these lines would work fine for your application
Showing a code snippet would have been a simpler and effective way to explain this. but currently no LabVIEW installed on my system
Maybe you are looking for
-
X200 Vista to Windows 7 Clean vs. Upgrade - Software License Concern
I bought an X200 with Vista (before the free upgrade) and have now purchased the Windows 7 upgrade software. Most of the tech forums recommend a clean install instead of an upgrade. Should I worry whether the software I have purchased (e.g. MS Offi
-
Error when submitting GRC request from IDM
Hello GRC gurus, We were running into an issue when trying to set up our IDM - GRC integration; when submitting a request to GRC via the AC Validation task the "Submit AC Request" task always encounters an error, but in spite of which the request sti
-
ADF Telnet -TML Parse Exception
I have just followed the process to use ADF to create a telnet session as mentioned in following URL [ http://www.oracle.com/technology/obe/obe1013jdev/telnet/eim_telnet_final.htm | http://www.oracle.com/technology/obe/obe1013jdev/telnet/eim_telnet_f
-
Approximate time needed for normal shutdown of the instance
how to figure out how much time needed to stop the oracle instance? do the oracle "shutdown immediate" in case when OS is shutting down or "shutdown normal"? What will be the result if there are still long-running transactions when OS shutdown initia
-
Help with MacMail for a newbie please
I have just set up our G5 Mac's on our Windows Domain, I have enabled IMAP on Exchange Server 2003 and configured Mac Mail accordingly. Mac Mail can now send and receive messages and attachment just fine but when a sent message fails you do not recei