XML and Array issue
I've created an array that loads data from an XML file. Now,
when a button is pressed I want this array to delete all previous
elements found in the array and add new elements coming from the
same XML file. So I created a function called arrayUpdate, here it
is...
function arrayUpdate():Void{
myArray.splice(myArray.length);
When the button is pressed it first calls this arrayUpdate
function and then calls the other function which loads the specific
data from the XML file. But I can't get it to work. It just keeps
adding new data to the old data. Did I do something wrong
here?
function arrayUpdate():Void {
delete myArray;
var myArray:Array = new Array();
}
Similar Messages
-
All the xml and arrays are getting NULL Problem
Hello guys
I am working on a project which uses xml loading, e4x and array manipulation extensively, and it was going good but now I got stuck on a strange problem. Whole code was fine and application was working and responding in a desired way, but then mystourisly it stopped working and started to retun NULL values to almost all the actionscript (internal) Arrays and XML varibales.
Now Whenever i load xml file and assign the loaded values to internal xml variables, internal values get only NULL instead of data.
Same is the situation with Arrays, I created some components in mxml, and when i passed them to arrays by reference, code gets compiled successfully, but again Array has only null values [that code was working fine too]
I am wondering if Adobe Flex did a silenced update or something similar and it is the result of that things !
I am using Adobe Flex 3.2 with SDK 3.3 on windows Vista Ultimate.
Please check this attached project, Import it and see if you face the same problem
Thanks
Link to Problem Project
http://isolatedperson.googlepages.com/problemXperiment.zip
Problem Screenshot
http://isolatedperson.googlepages.com/xmlissue.JPGUse HTTPService to load the data. You'll have fewer problems.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="dataSvc.send();"
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
import mx.rpc.events.ResultEvent;
[Bindable] private var xlc:XMLListCollection;
private function loadXML(evt:ResultEvent):void{
xlc = new XMLListCollection(evt.result.individual.@id as XMLList);
]]>
</mx:Script>
<mx:HTTPService resultFormat="e4x" result="loadXML(event)" url="alirazaTree.xml" id="dataSvc"/>
<mx:ComboBox id="cbx" dataProvider="{xlc}"/>
</mx:Application> -
Hi guys, first time poster so I apologize if this is a basic
question! I am creating a Media cataloging application to run as a
desktop application through Air, I initially built this as a Flex
web app but have decided I want it as a standalone. Anyway my
problem is this, in the web version I was using the following code:
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="srv.send()"
xmlns:ns1="com.dougmccune.containers.*"
backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #2CE1AC]" width="1281">
<mx:HTTPService id="srv" url="dvdLibrary.xml"/>
<mx:DataGrid x="336" y="57"
dataProvider="{srv.lastResult.dvdList.dvd}" id="dg" width="935"
height="354">
<mx:columns>
<mx:DataGridColumn headerText="Title"
dataField="title"/>
<mx:DataGridColumn headerText="Studio"
dataField="studio"/>
<mx:DataGridColumn headerText="Released"
dataField="releaseDate"/>
<mx:DataGridColumn headerText="Runtime"
dataField="runtime"/>
<mx:DataGridColumn headerText="Colour"
dataField="color"/>
<mx:DataGridColumn headerText="Aspect Ratio"
dataField="aspectRatio"/>
</mx:columns>
</mx:DataGrid>
The above code uses the XML file to populate the dataGrid
(which I am sure you know already! :) ), however when I port this
to an Air app, it no longer works. I have tried changing the
<mx:HTTPService> tag and attributes to the <mx:XML
source="pathtoXML.xml" id="srv"/> and <mx:Model
source="pathtoXML.xml" id="srv"/> but neither works.
Can anyone shed any light? I also get and error saying
something about creationComplete send() is not a function?
Is there a very different way of achieving this in Air?
Thanks in advance!Hi guys, first time poster so I apologize if this is a basic
question! I am creating a Media cataloging application to run as a
desktop application through Air, I initially built this as a Flex
web app but have decided I want it as a standalone. Anyway my
problem is this, in the web version I was using the following code:
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="srv.send()"
xmlns:ns1="com.dougmccune.containers.*"
backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #2CE1AC]" width="1281">
<mx:HTTPService id="srv" url="dvdLibrary.xml"/>
<mx:DataGrid x="336" y="57"
dataProvider="{srv.lastResult.dvdList.dvd}" id="dg" width="935"
height="354">
<mx:columns>
<mx:DataGridColumn headerText="Title"
dataField="title"/>
<mx:DataGridColumn headerText="Studio"
dataField="studio"/>
<mx:DataGridColumn headerText="Released"
dataField="releaseDate"/>
<mx:DataGridColumn headerText="Runtime"
dataField="runtime"/>
<mx:DataGridColumn headerText="Colour"
dataField="color"/>
<mx:DataGridColumn headerText="Aspect Ratio"
dataField="aspectRatio"/>
</mx:columns>
</mx:DataGrid>
The above code uses the XML file to populate the dataGrid
(which I am sure you know already! :) ), however when I port this
to an Air app, it no longer works. I have tried changing the
<mx:HTTPService> tag and attributes to the <mx:XML
source="pathtoXML.xml" id="srv"/> and <mx:Model
source="pathtoXML.xml" id="srv"/> but neither works.
Can anyone shed any light? I also get and error saying
something about creationComplete send() is not a function?
Is there a very different way of achieving this in Air?
Thanks in advance! -
Inserting a node in XML and retaining the doc type
Hi All,
I want to insert one new node in an XML. Using the following code I can do that. But the problem is if the XML has doc type declaration then its giving me problem. After inserting the node the transformer is removing my doc type declaration from the XML. I have to retain the doc type definition (including entity declaration) as it is in the original XML file.
The following is the code that I'm using.
Document vDoc = null;
try {
// Contruct the DOM document
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
vDoc = builder.newDocument();
Node vFormNode = vDoc.createElement("Form");
vDoc.appendChild(vFormNode);
// Convert into a String the DOM document
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(vDoc);
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
transformer.transform(source, result);
catch (Exception e) {
System.out.println("Error: " + e.getMessage());
}The doc type def. in the original file is some thing like this.
<!DOCTYPE article SYSTEM "someurl/TFJA.dtd"[
<!ENTITY T0001 SYSTEM ".\BTN_A_000112809_O_XML_IMAGES\BTN_A_000112809_O_T0001.gif" NDATA GIF>
<!ENTITY F0001 SYSTEM ".\BTN_A_000112809_O_XML_IMAGES\BTN_A_000112809_O_F0001g.gif" NDATA GIF>
<!ENTITY F0002 SYSTEM ".\BTN_A_000112809_O_XML_IMAGES\BTN_A_000112809_O_F0002g.jpg" NDATA JPEG>
]>I know that I can set up the doc type definition in the new XML using the following properties of the transformer.
transformer.setOutputProperty( OutputKeys.DOCTYPE_SYSTEM,"article" );
transformer.setOutputProperty( OutputKeys.DOCTYPE_PUBLIC,"my DTD def");
I cannot hard code the DTD def. as it can vary from one XML to another. Using doc.getDocType() I can get the doctype of the original XML. But is it is not returning the complete def. including entities declaration. Its giving me "someurl/TFJA.dtd".
Is there any way to retain the complete doc type in the original XML file? I don't have much experience in XML and this issue is eating my head.. Also do I have to modify the DTD to accommodate the new tags added in order to make it a valid XML?
Any help and sample code would be highly appreciated.Hi,
I also had similar requirement and when searching i came across this post. Later i found the solution for this. Instead of hardcoding the doctype you can get it from Document as follows..Snippet from the code i used..
DocumentType doctype = document.getDoctype();
if(doctype != null) {
String id = doctype.getSystemId();
if(id == null || id.length() == 0)
return;
transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, id);
id = doctype.getPublicId();
if(id == null || id.length() == 0)
return;
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, id);
Hope this helps.
Regards,
Deepak -
XML and its influence over program design (2 issues)
I have 2 open questions about XML and Java. I apologise if they are not clear-cut or specific enough, but really I am fishing for sound advice.
I am trying to develop a J2EE application but find myself stuttering at an early stage because I cannot decide on the best design for my application. Part of my problem is a lack of experience with the different J2EE technologies/API (especially XML APIs), and the realisation that there is 101 ways to do what I want to do.
A major issue is this: my application basically is concerned with representing conversations between the server and a user, e.g. a simple sequence of yes/no questions asked by the server to the user, which the user replies to in turn. I believe that the XML format would be a very suitable way to represent these conversations. My first question is:
* Should the decision to use XML as a storage format influence the design of the rest of the program? I feel that in choosing XML to represent the conversation data, I am stuck thinking about the rest of my program in a XML way (i.e. doing everything using a DOM etc.). Am I right in thinking that my program should be designed in such a way that an XML-based storage system could be easily interchanged with, say, a relational flat-tabled database?
My second question is:
* Imagine that each conversation contains one or more questions, and there are, say, 4 different types of question (e.g. yes/no, multiple choice, etc.). Each of these needs to be handled in a different way. Is there a good pattern or recommended way of handling this sort of situation in code, ideally avoiding a big 'if' or switch statement (e.g. if the node is of "ABC" type do this, else if it is "yes/no"...). It would be great if one could easily add new types of question to the XML and then similarly one can make easy additions to the code to cope with these new cases.
Thank you very much indeed for any advice.
GregI am trying to develop a J2EE application but find
myself stuttering at an early stage because I cannot
decide on the best design for my application. Part of
my problem is a lack of experience with the different
J2EE technologies/API (especially XML APIs), and theThat's nothing to be ashamed of. And realising that you lack experience and trying to remedy that is a good sign.
A major issue is this: my application basically is
concerned with representing conversations between the
server and a user, e.g. a simple sequence of yes/no
questions asked by the server to the user, which the
user replies to in turn. I believe that the XML
format would be a very suitable way to represent
these conversations. My first question is:
XML might be overkill if it's just a question followed by an answer and neither contains complex hierarchical data structures.
* Should the decision to use XML as a storage format
influence the design of the rest of the program? ICertainly not.
XML should represent data structures that are natural to your program, thus becoming a tool rather than forcing its structure upon you.
feel that in choosing XML to represent the
conversation data, I am stuck thinking about the rest
of my program in a XML way (i.e. doing everything
using a DOM etc.). Am I right in thinking that my
program should be designed in such a way that an
XML-based storage system could be easily interchanged
with, say, a relational flat-tabled database?
Flexibility is good to keep in mind, but at the moment I'd worry about just getting something to work.
* Imagine that each conversation contains one or more
questions, and there are, say, 4 different types of
question (e.g. yes/no, multiple choice, etc.). Each
of these needs to be handled in a different way. Is
there a good pattern or recommended way of handling
this sort of situation in code, ideally avoiding a
big 'if' or switch statement (e.g. if the node is of
"ABC" type do this, else if it is "yes/no"...). It
would be great if one could easily add new types of
question to the XML and then similarly one can make
easy additions to the code to cope with these new
cases.
Think of a factory that creates the handlers on the fly based on the actual message received.
If the factory makes use of some mapping construct to do so there's no need for any conditionals at all in your decision tree.
I've myself used XML structures successfully to define such mappings (and so have others) on disc, but simple ones can be easily represented using just a properties file. -
XML Parser for PL/SQL and related issues
I need to have further information about some of the following
issues and XML features and make a determination useful for
evaluation and recommendation:
ISSUES
1) Is there a maximum size for an XML document to provide data
for PL/SQL(or SQL) across tables, provided that no CLOB are used?
2) How about from Oracle to an XML document ?
3) Is there a ratio between XML document size and main memory and
SGA size. What are Oracle's recommendations /
4) Can the Oracle Application Server run on a DHCP NT server when
using XML parsing ? Is it NT Service Pack 3 and 4 compatible ?
5) How parsers can interact with one another or related tools ?
For example, how the XML parser for c/c++ could be useful when
using Pro*C/C++ (programmer 2000) or OCI interfaces ? In other
words, what is the business logic in using these tools ?
nullAnthony D. Noriega (guest) wrote:
: I need to have further information about some of the following
: issues and XML features and make a determination useful for
: evaluation and recommendation:
: ISSUES
: 1) Is there a maximum size for an XML document to provide data
: for PL/SQL(or SQL) across tables, provided that no CLOB are
used?
The limit should be what can be inserted into an object view.
: 2) How about from Oracle to an XML document ?
The limit should be what can be retrieved from an object view.
: 3) Is there a ratio between XML document size and main memory
:and SGA size. What are Oracle's recommendations /
Not directly due to the relationship between XML metadata and
data not being constrained.
: 4) Can the Oracle Application Server run on a DHCP NT server
: when using XML parsing ?
If it can run a JavaVM with the correct permissions there are no
other special requirements.
:Is it NT Service Pack 3 and 4 compatible ?
No special requirements here.
: 5) How parsers can interact with one another or related tools ?
: For example, how the XML parser for c/c++ could be useful when
: using Pro*C/C++ (programmer 2000) or OCI interfaces ? In
other
: words, what is the business logic in using these tools ?
Not really sure of your question. The XML components are useful
in any application where I am processing documents or data with
an XML structure. The choice to use XML can be based on quite a
range of requirements due to its declarative syntax and open
standards. If you give me a specific application, I can perhaps
be more helpful.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
Ejb-jar.xml and orion-ejb-jar.xml configuration issue
Chris,
We have an application that uses the Oracle 10g Application Server and WebSphere MQ v5.3 w/ fixpack 9.
Our application is a J2EE messaging system which essentially consists of Message Driven Beans, the EJB
realization of the J2EE Java Message Service (JMS) API. Our application has Message Driven Beans which
listen to queues and send messages to queues -- a simple messaging system. Currently we can listen to queues, but
cannot send messages to queues in the Oracle 10g Application Server environment.
Any J2EE application server has its own implementation of Java Naming Directory Interface (JNDI) API that
deployed J2EE applications utilize to lookup resources such as Data Sources, JMS Destinations (i.e. MQ Queue),
JMS QueueConnectionFactories (i.e. MQ QManagers).
Our application uses the 3rd party JMS Provider, WebSphere MQ.
MQ ships with a JMSAdmin tool which allows one to create JMS administered objects (i.e. objects a java
application searches for in some JNDI directory) that reside in some JNDI context. We create a JNDI context for
MQ resources, queues and QManagers. We configure the MQ provided
JMSAdmin tool with two property name/value pairs:
PROVIDER_URL=file:/opt/mqm/JNDI-Directory
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
A resultant .bindings file is created in /opt/mqm/JNDI-Directory which represents our JDNI context
containing our JMS administered objects. A standalone java application that needs to directly access this
JNDI context can simply conduct a JNDI lookup on the following context: "java:comp/resource/MQSeries/". An
example of how a standalone application would lookup a JMS administered object named "qNumber1" would be to
lookup "java:comp/resource/MQSeries/qNumber1". This lookup would result in the standalone java application
having a JMS reference to an MQ Queue.
There is a major difference in how an enterprise EJB application deployed into a J2EE Container (Oracle 10g App Server)
conducts a JNDI lookup on a 3rd party resource such as MQ as a JMS Provider. A typical EJB application deployed
into a J2EE container as an .ear (enterprise archive) file has implicit access to the application server's own
JNDI context. This JNDI context is usually "java:comp/env/". Looking up the Application Server's own Data Source or
it's own JMS Resources is easy. An application that needs references to these Application Server provided resources
simply conducts a lookup for "java:comp/env/jms/someQ" or "java:comp/env/jdbc/myDataSource".
The problem we face is mapping our MQ JNDI context to the Oracle App Server's own JNDI context. We believe this is
accomplished through mappings defined in both the ejb-jar.xml (EJB Descriptor) and the application server specific
counterpart, orion-ejb-jar.xml. Note that Oracle 10g Application Server uses the popular orion J2EE container for
hosting J2EE enterpise applications.
Our Message Driven Beans (MDBs)currently listen to the Queue at the JNDI location "prodQ". Our problem is that we cannot
get our MDB to send messages to any queues. Note that the MQ implementation of the queues and Queue Managers work
flawlessly with standalone java applications. It's safe to say that the MQ objects are working.
We are looking for a solid example of how the ejb-jar.xml and the orion-ejb-jar.xml map 3rd party JMS provider
JNDI locations to the App Server's JNDI context.
Below is how we have attempted to configure our own ejb-jar.xml and orion-ejb-jar.xml:
ejb-jar.xml begin >>>>>>>>>>>>>>><?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Production Message Driven Bean</display-name>
<enterprise-beans>
<message-driven>
<display-name>prodMdb</display-name>
<ejb-name>prodMdb</ejb-name>
<ejb-class>message.handler.AIDMSMessageConsumerBean</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>prodQCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodQ</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodR</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
<<<<<<<< ejb-jar.xml end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
begin orion-ejb-jar.xml >>>>>>>>>>>>>>>>>>>>>>>>>>><orion-ejb-jar>
<enterprise-beans>
<message-driven-deployment name="prodMdb" connection-factory-location="java:comp/resource/MQSeries/prodQCF" destination-location="java:comp/resource/MQSeries/prodR">
<resource-ref-mapping location="prodQ" name="prodQ">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
<resource-ref-mapping location="prodR" name="prodR">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
</message-driven-deployment>
</enterprise-beans>
</orion-ejb-jar>
<<<<<<<<< end orion-ejb-jar.xml <<<<<<<<<<<<<<<<<<<<<<<<If you look at the contents of a deployment plan (Plan.xml) when you have it generated
<deployment-plan ...>
<module-override>
<module-name>ejb.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="true">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>ejb-jar</root-element>
<uri>META-INF/ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>persistence-configuration</root-element>
<uri>META-INF/persistence-configuration.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>persistence</root-element>
<uri>META-INF/persistence.xml</uri>
</module-descriptor>
</module-override>
</deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
external (see external=false)
The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
configurations by using a deployment plan, instead of having to extract the contents from the jar file
and then repackage it again.
No need to worry about a clustered environment, you can place the jar and the deployment plan
on the server where the admin server is located, when you deploy an application you deploy it to
the cluster and everything is taken care off.
More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html -
PDF output does not refresh data in BI Publisher, XML and HTML do refresh
I just upgraded to BI Publisher 10.1.3.4.0 and I noticed that the PDF format of the reports does not reflect recent changes in data, while XML data and HTML output do reflect changes in data immediately.
I'm using BI Publisher to print APEX applications reports. When I change some data in APEX forms, I click again in the Print button and the data remains unchanged. I made some testing inside Oracle BI Publisher, and noticed that XML data and HTML output do reflect changes, but PDF output remains with the old data for some unknown amount of time. I cannot identify a method to force the PDF to refresh, just un-log and log in again several times until the data appears updated. This is serious because when users change data and print again, they expect the changes to be reflected in the new printable report, and may not notice that the data is the old version.
OS is Oracle Enterprise Linux.
Any help on this will be very welcome.
FranciscoOpen the report in Edit Mode Click on the reports and in the properties section Uncheck the
Enable Document Cache Property and your issue should be resolved. -
Just trying to clarify some issues as I try and learn about XML, and specifically how it integrates into the DB.
1 - Is there a way with Oracle tools for me to get an XSD of an existing 9i relational schema? We are not currently using the XML DB, but our middleware developers would like to have an up to date XSD to use for their internal mapping.
2 - Is there any way that I can keep that XSD up-to-date automatically, so I get a new one whenever the schema gets updated?
3 - If I wanted to investigate storing XML docs within the DB in native XML format, I need to have an XML DB, correct? Is this DB construct maintained seperatelly from my "normal" relational schema? or are they kept in sync by Oracle?
I know these may all be real basic questions, but as I said, I'm new to XML and Oracle. I am reading as much as I can, but there are a lot of docs out there.
Thanks,
MikeHi
1. On my opinion such a tool doesn't exists. Some parts can be implemented elsewhere, but not as described by you... e.g. with XSU if you specify the parameter "withschema" the XSD of the executed statement is generated. Another example is to use DBMS_METADATA to dump the data dictionary in XML (but not XSD, of course you could write your own XSLT to do this transformation...).
2. -
3. If you use XSD-based tables the XSD and the relational model are stored separately in the data dictionary. Therefore if you change the XSD you have to drop/create the XSD-based table... no schema evolution yet.
Chris -
So I've installed and uninstalled itunes 3 times, using control panel to unintall everything, then ccleaner to make sure nothing is left over. No ipod service and stuff left.
Each time I install, the defult folder where the Media Folder, and album art folder plus all the xml and other files are put on my desk top.
Opening up Itunes, preferences, changed folder to user/music/itunes it doesn't work, keeps defaulting back to desktop. Help please
OS is Windows VistaGood to hear you got it fixed. A common reason for this issue is a problem with security permissions. This is another approach that may help in such cases.
Repair Permissions
Right-click on your main iTunes folder and click Properties, then go to the Securitytab and click Advanced. Use the Change Permissions... button grant to your account (or the Users group) and SYSTEM full control of this folder, subfolders and files, then tick the option to Replace permissions entries... which will repair permissions throughout the library. When complete switch to the General tab, click in the Read-only check box to clear it, then click Apply.
If you don't have the option to change the permissions then use the Owner tab and Edit... button to take ownership from an account with administrator privileges. Tick the option to Replace owner on subcontainers and objects.
Repeat with the media folder if it isn't stored inside the main iTunes folder.
tt2 -
Hi Wizards
I'm in an endeavour to do the following things -
1.Generate XML output from Oracle 8i Lite database
2.Modify the XML and update the database taking the modified XML.
My java platform is JDK 1.2. I've used the XML SQL Utility for Java, and in doing so i've been successful with the 1st step. I've used the Oracle 8.1.6SDK JDBC Driver which is compatible with JDK 2.The code fragment is like the following -
import java.io.*;
import java.sql.*;
import java.math.*;
import oracle.xml.sql.query.*;
import oracle.jdbc.*;
import oracle.jdbc.driver.*;
public class orasql1
public static void main(String args[]) throws SQLException
Connection conn = null;
String tabName = "emp";
try {
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
conn = DriverManager.getConnection("jdbc:Polite:POlite", "SYSTEM", "manager");
catch (Exception e) {
System.out.println("Oracle Connection error\t:");
System.out.println(e);
System.exit(0);
OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from " + tabName);
qry.setRowsetTag("SCHEMADOC_1");
qry.setRowTag("EMPLOYEE");
qry.setStyleSheet("emp.xsl");
String xmlString = qry.getXMLString(true);
conn.close();
try {
File output = new File("emp.xml");
FileWriter xmlFile = new FileWriter(output);
xmlFile.write(xmlString,0,xmlString.length());
xmlFile.close();
catch (Exception e) {
System.out.println("Output file error\t:");
System.out.println(e);
System.exit(0);
I am putting some sample code for step 2 in the following section -
import oracle.xml.sql.dml.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.*;
import java.net.*;
public class orasql2
public static void main(String args[]) throws SQLException
Connection conn = null;
String tabName = "emp";
String fileName = "emp.xml";
try {
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
conn = DriverManager.getConnection("jdbc:Polite:POlite", "SYSTEM", "manager");
catch (Exception e) {
System.out.println("An error has occurred.");
System.out.println("Please check your CLASSPATH variable..");
System.out.println(e);
System.exit(0);
OracleXMLSave save = new OracleXMLSave(conn, tabName);
URL url = save.createURL(fileName);
save.setRowTag("SCHEMADOC_1");
int rowCount = save.insertXML(url);
System.out.println("Successfully inserted "+rowCount+" rows into "+tabName);
conn.close();
Compiling the above code is fine, no errors! But while running the application I get the error -
Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: java.lang.Class
CastException: oracle.lite.poljdbc.OracleStatement
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:345)
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:248)
at orasql2.main(orasql2.java:27)
My question is whether this thing can be done at all using Oracle 8i Lite? If so then how?
Waiting for ur advices.
Biplab
(An Indian, but at present in Houston, Texas)It looks like be a classpath issue. Would you check with the class name.
-
SAP BW data in ODS to XML and sending this XML file to 3rd Party
Hi Gurus,
We are having a scenario in which we have to convert our data in ODS to XML and need to provide this XML file to our clients so that they can use this XML file in their 3rd party system.
Now the issue is that i have created ABAP program for converting into XML.
If I execute this program, since i have given path as my Desktop, the converted XML file gets saved on my Desktop.
But the problem is how i can provide this XML file to the client.
Is there any way of converting this XML file to html and send them the URL ......
plz suggest me.... what can be done......
my ABAP code u can see in the following link
Extract SAP BW Data into XML
thanks and regards,
P.Madhusudhan RajuHi,
Pls go through the link below it may help you
http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417100)ID1537206350DB01670597797729934632End?rid=/library/uuid/8c10aa90-0201-0010-98a0-f071394bc9ae&overridelayout=true
Regards,
Marasa. -
How .xml and ~/Music/iTunes/iTunes Music work
Have posted this before, just reposting in hopes of getting an answer...
In 2.5 years we've had 3 hard drives, 2 logic boards, a power supply, multiple crashes, etc. During all this time of data recovery and frantic backing up, I managed to duplicate all but the most recently added songs in my iTunes folder. In the past I had deleted these duplicates from the Music library. So, I don't think I had these duplicates before re-importing or adding my songs to the iTunes program after an erase and install two days ago. The erase and install did not get rid of our erratic computer problem(s), and Apple is graciously sending us a new iMac.
I'd like to clear up this duplicate issue before importing my library to iTunes on the new computer. As far as I can tell, I'll have to delete each duplicate by hand. My question relates to how the iTunes Music folder, the iTunes Music Library.xml doc, and the actual iTunes program work together.
(1) Should I go into ~/Music/iTunes/iTunes Music/album folders and delete each song by hand from there? Or should I import all the duplicates in these folders and delete them from within iTunes? In the end, I want no duplicates in the iTunes program and no duplicates in my iTunes Music/album folders.
(2) Could the .xml file be saving data that would cause these duplicates to be recreated? Should I resave it after deleting duplicates? Does the .xml file affect the Music library at all?
(3) This last time, I don't know if I officially "imported" or "added" music or what. iTunes had been reinstalled, was empty. First, I put iTunes Music Library.xml on my desktop, and then went to File>Import (like on http://docs.info.apple.com/article.html?artnum=93313). But, absolutely no music showed up in the music library. All my playlists showed up, and they had no music. Only radio stations we had put in playlists showed up. In the referenced article, it says NOT to add music when you are doing this, so I didn't. THEN, I dragged ~/Music/iTunes/iTunes Music and dropped it into iTunes. All the duplicates were created then, I believe.
Did I "import" or "add", or what? Did I cause duplicates to be created? Should I drag-and-drop ~/Music/iTunes/iTunes Music or import it BEFORE I do the .xml thing? I believe next time I'll take advantage of the File>Back Up To Disc function, and I'm assuming this won't happen.
Thank you for your help!
Deanna
P.S. After my initial post, somebody suggested the article at
http://docs.info.apple.com/article.html?artnum=93732
However, this article deals with .xml and iTunes Music Library, which is a database file. I need info on .xml and iTunes Music Folder, the folder that physically holds all my iTunes.the developers of SuperSync claim the app works over the WAN.
-
Hello I am doing some SOAP XML stuff and I am having an issue that hopefully I can get some help with.
Is XML like this valid to do in a SOAP message?
<prompt>1 &_lt_; 0? <prompt>It's suppose to represent "1 < 0?"
* the forum formatter seems to eat up my encoded text and transofrms it into acutal "<" so I am placing underscores "_" everywhere to keep the text. so above is actually without underscores
From what I've read I think it is. I have text like this transported as part of the overall SOAP message to my client from the server.
In my code I do:
// Create an instance of the DocumentBuilderFactory
DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();
// Get the DocumentBuilder from the factory
DocumentBuilder builder = documentFactory.newDocumentBuilder();
Document doc = builder.parse(inputStream);
...inputStream is an InputStream (specifically ByteArrayInputStream) containing the XML.
The issue I am having is that wherever I have an '&' (such as "&_lt_;" or "&_gt_;" or "&" etc...) the parsing seems to get cut off and the rest of the string doesn't seem to get parsed. So the above string "1 &_lt_; 0?" ends up being "1 ".
Also is there an easy way to get back or rebuild the XML into a string from a Document object? I would really like to do that right after I do the parse method and see if the XML data that the Document object has is the same as what's in the inputStream (which is "1 &_lt_; 0?").
Any input you can provide is much appreciated. Thanks,
LatemHello I am doing some SOAP XML stuff and I am having an issue that hopefully I can get some help with.
Is XML like this valid to do in a SOAP message?
<prompt>1 &_lt_; 0? <prompt>It's suppose to represent "1 < 0?"
* the forum formatter seems to eat up my encoded text and transofrms it into acutal "<" so I am placing underscores "_" everywhere to keep the text. so above is actually without underscores
From what I've read I think it is. I have text like this transported as part of the overall SOAP message to my client from the server.
In my code I do:
// Create an instance of the DocumentBuilderFactory
DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();
// Get the DocumentBuilder from the factory
DocumentBuilder builder = documentFactory.newDocumentBuilder();
Document doc = builder.parse(inputStream);
...inputStream is an InputStream (specifically ByteArrayInputStream) containing the XML.
The issue I am having is that wherever I have an '&' (such as "&_lt_;" or "&_gt_;" or "&" etc...) the parsing seems to get cut off and the rest of the string doesn't seem to get parsed. So the above string "1 &_lt_; 0?" ends up being "1 ".
Also is there an easy way to get back or rebuild the XML into a string from a Document object? I would really like to do that right after I do the parse method and see if the XML data that the Document object has is the same as what's in the inputStream (which is "1 &_lt_; 0?").
Any input you can provide is much appreciated. Thanks,
Latem -
XML newbie question - xml into arrays
I am pretty new xml and I am working with a file that has
text
associated with images in the file and I would like to move
the text
into a xml document.
I heard that a good way to deal with xml is to load it into
an array. I
have my text set up in arrays already, so my whole file
aready works in
that way. So all I have to do is load my xml document into my
arrays. I
have the xml document loading fine, but I don't know how to
get the info
into my arrays.
My xml document looks like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<index_content>
<image no="1">
<imgLink>"pages/collection.html"</imgLink>
<title>"Title 01"</title>
<text>"Text bla bla, bla 01, Text bla bla, bla
01"</text>
<corner>"unisex"</corner>
</image>
<image no="2">
<imgLink>"pages/collection.html"</imgLink>
<title>"Title 02"</title>
<text>"Text bla bla, bla 02, Text bla bla, bla
02"</text>
<corner>"mens & womens"</corner>
</image>
<image no="3">
<imgLink>"pages/collection.html"</imgLink>
<title>"Title 03"</title>
<text>"Text bla bla, bla 03, Text bla bla, bla
03"</text>
<corner>"mens & womens"</corner>
</image>
<image no="4">
<imgLink>"pages/collection.html"</imgLink>
<title>"Title 04"</title>
<text>"Text bla bla, bla 04, Text bla bla, bla
04"</text>
<corner>"mens & womens"</corner>
</image>
</index_content>
My arrays in Flash are:
var imgLinkURLs:Array = [];
var imgTitles:Array = [];
var imgTexts:Array = [];
var imgCornerLabel:Array = [];
So I think i need for loops pushing for example imgLink from
image no1
into imgLinkURLs array, then push imgLink from image no2, and
so forth.
Then do the same for imgTitle and the other arrays...
How would I do this the right way?you can do it in just one loop, going through all the image
tags in index_content and for each tag fill the values of all four
arrays
for (i...) {
get the appropriate child of index_content
first_array[ i ] = value of first tag
second_array[ i ] = value of second tag
no need for multiple loops.
flash has functionality for xml files, but it helps to write
a little wrapper around it, to simplify programming, especially if
you work with xml a lot.. I wrote my for work, so I can't show it
to you, but it's not very complicated to do
Maybe you are looking for
-
Missing a User access in the log-on picture
Lacks a user access to log on picture after start-up in Yosemite. In user administration there has been created two user entries - an administrator and a normal access. The normal access is not visible from the log on picture, and it is only possible
-
Elements 9: Effects not visible after Upgrading to Mavericks
I just go from Snow-Leo to Mavericks. Now I cant see the effects in the list. Broken Preference?
-
FCoE with Cisco Nexus 5548 switches and VMware ESXi 4.1
Can someone share with me what needs to be setup on the Cisco Nexus side to work with VMware in the following scenario? Two servers with two cards dual port FCoE cards with two ports connected to two Nexus 5548 switches that are clusterd together. W
-
How to add Material photo in SAP
Hi folks, Does anybody know how to add material photo to material No? As now, when our old spare parts are bad, maintanance user have to find a new one to replace, so they need to provide the material No to warehouse user or purchase dept.
-
I will be re-imaging my computer onto a new drive - do I need to deactivate?
Hi, due to some font issues and crashing in Photoshop that I cannot fix, I will need to reformat my computer and completely re-install Windows 7, and Master Collection CS5. Do I need to deactivate my CS5.5 before swapping out the drives and re-imagin