How to access System properties in xml file
hi,
i want to read system properties in my xml file using ${} .
I tried it but did not find any way.But when i use log4j if i set some variable in
System properties that properties is read by the log4j.properties .
I am writing a simple program that read a xml properties file file
try {
props = new Properties();
fis = new FileInputStream(xmlFile);
props.loadFromXML(fis);
}before reading this file i set some properties and accessing this properties from that xml .but i cant.
Thanks
sabre150 wrote:
fun_with_java wrote:
can you give some example?Not really - I would have to write the code for you and I'm not getting paid for writing your code.Thanks for your kindness.
I dont ask you to write the code.Need some help to start it .Actually i dont have knowledge that
whether xml file automatically read it or i have prase the system property manually. Now i got the way to
access system property in xml..
Ok thanks again..
Thanks & Regards
Similar Messages
-
How to access custom properties in .vm file
Hi,
I have created custom property for screen using File -> Project Properties.
This property apply to one of my screen.
If I want to access the value of the custom property in .vm.
How to access that value. I tried using screen.getTest() but it doesn't return anything for me.Hi Peter,
I followed the steps.
1)created custom property
2)assign that custom property using right click on screen and assign some value
eg. custom property name - Test
and value as "abc"
i need abc in vm file.following my vm file
it's not working
<input type="text" id="a1" name="a1" value="${screen.getProperties().get("Test")}" tabindex="6" size="30" >
#set ( $value = $screen.getProperties().get("Test") )
<input type="text" id="a1" name="a1" value="$value" tabindex="6" size="30" >
#if( ${control.isVisible()})
#if( ${control.getButtonClass().equals("submit")} )
<input class="btn" type="button" value="Back" tabindex="#tabIndex()" onclick="javascript:back()">
#end
#if( ${screen.getProperties().get("Test").equals("mahesh")} )
<input class="submit" id="submit" name="submit" type="submit" value="Submit" alt="Submit" tabindex="12">
#else
<input class="${control.getButtonClass()}" id="${control.getEncodedID()}" name="${control.getId()}" type="submit" value="${control.getText()}" alt="${control.getText()}" tabindex="#tabIndex()">
#end
#end
#if( ${control.getButtonClass().equals("submit")} )
</div>
#end
Edited by: 848231 on May 18, 2011 3:00 AM -
How can we get tag of XML file using SAX
Hi ,
I'm parsing one SAX parser , I'have almost done this parsing. i have faced problem for one case, i'e how can we get tag from XML file using SAX parser?
XML file is
<DFProperties>
<AccessType>
<Get/>
</AccessType> <Description>
gdhhd
</Description>
<DFFormat>
<chr/>
</DFFormat>
<Scope>
<Permanent/>
</Scope>
<DFTitle>gsgd</DFTitle>
<DFType>
<MIME>text/plain</MIME>
</DFType>
</DFProperties>
I want out like GET and Permanent... means this one tag which is present inside of another tag.
Handler class like
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
if(_ACCESSTYPE.equals(localName)){
accessTypeElement=ACCESSTYPE;
public void characters(char[] ch, int start, int length)
throws SAXException {
if (_ACCESSTYPE.equals(_accessTypeElement)) {
String strValue = new String(ch, start, length);
System.out.println("Accestype-----------------------------> " + strValue);
//System.out.println(" " + strValue);
public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (_ACCESSTYPE.equals(localName)) {
_accessTypeElement = "";
. please any body help meHi ,
I have one problem,Please help me.
1. How can I'll identify where exactly my Node is ended,means how how can we find corresponding nodename? in partcular place
<Node> .............starttag1
<NodeName>Test</NodeName>
<Node>................starttag2
<nodeName>test1</NodeName>
</Node>..................endtag2
<Node>.....................starttag3
<NodeName><NodeName>
<Node> .........................starttag4
<NodeName>test4</NodeName>
</Node>.......enddtag4
</Node>...........end tag3
</Node>............endtag1
my code is below
private final String _NODENAME = "NodeName";
private final String _NODE = "Node";
private String _nodeElement = "";
private String _NodeNameElement = "";
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
if (_NODENAME.equals(localName)) {
NodeNameElement = NODENAME;
if(_NODE.equals(localName)){
System.out.println("start");
if (_NODENAME.equals(localName)) {
NodeNameElement = NODENAME;
public void characters(char[] ch, int start, int length)
throws SAXException {
if (_NODENAME.equals(_NodeNameElement)) {
String strValue = new String(ch, start, length);
String sttt=strValue;
System.out.println("NODENAME: ************* " + strValue);
if(_NODE.equals(_nodeElement)){
if (_NODENAME.equals(_NodeNameElement)) {
String strValue = new String(ch, start, length);
String sttt=strValue;
System.out.println("nodevalue********** " + strValue);
public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (_NODENAME.equals(localName)) {
_NodeNameElement = "";
if(_NODE.equals(localName)){
System.out.println("NODENAME: %%%%%%%%%");
please help me. How can I figure node ending for particular nodename -
How to check the element in xml file by xpath
hi all,
* How to check the element in xml file by xpath
for the following XML file,
* I want to check whether
the element (sage) is present or not in the following xml file XPATH expression...
* I have tried by the following expression ,
NodeList result = (NodeList) xpath.evaluate("//*:student/*:sage/text()",xml_dom,XPathConstants.STRING);
System.out.println(result.item(0).getLocalName()); * I want to get the Element sage as String value....
but i am not able to get the element,why that ??? and How to do that ???
MyXML File :
<x:student>
<x:sname>aaa</x:sname>
<x:sage>26</x:sage>
</x:student>
Thanks,
JavaImran<code>* Thanks for reply....
* </code><code>In </code>
<code>x:student element x represents the namespace...thats why i put *:student in my expression....
"//*[local-name() = 'student']/*[local-name() = 'sage']/text()"* By the above code , i am not able to get the sage as string from
</code> resul.item(0).getLocalName() method.......?
* How to get that as string format ? -
I have created a user in oracle BPM but it is not reflected in system-jazn-data.xml file and I am unable to authenticate that user to create context as needed in workflow client
weblogic credentials are different.
and using thode credentials I am able to login to weblogic server
the users I am talking about is the process users defined in realm.
in realm those users are defined as Default authenticator and OID authenticator.
and I am trying to authenticate one of those users defined in realm using java api so that I an access a process defined In Oracle BPM 11g -
How to view AR dunning letter XML file (raw data)?
Hi,
Can anybody tell how to view AR dunning letter XML file (raw data) as I like to modified the dunning letter and like to know which fields I can add to our dunning letter layout. thanks.Hi
These are the steps you need to do to get the output in XML Raw format.
Step 1
1- Go to System Administrator -> Concurrent -> Program - Define
2- Query the Dunning Letter Print
3- Set the format output as XML
Step 2
1- Ftp Oracle E-business suite Server
2- Get the file ARDLP.rdf from $AR_TOP/reports
3- Open the report using Oracle Reports
4- Change the output to XML.
ARDLP.rdf is a report provided by Oracle Corporation so it is a good idea to make a backup of the same,
before making any changes. Hope this will help.
Regards
Ali -
How to print system-time in XML?
Hi,
Please help me how to print system-time in XML. Like we use sy-uzeit in ABAP.
Can we use anything in XML too..
Thanks & Regards,
Saihi movilogo
Please try this.
Create hidden item P1_DATE
Create On load process in page 1 and put this code
begin
:P1_DATE:=TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MM:SS');
end;
Open your region in Page 1 put this code in Footer area
*&P1_DATE.*
Refresh your page.
you will get the output like this.
16-SEP-2009 11:09:17
thanks
Mark Wyatt -
How-to use Excel for the XML file input?
Hello all,
Following our discussion with Gerhard Steinhuber on the very nice tutorial from Horst Schaude , "How to upload mass data via XML File Input" , I am starting this new discussion.
In the comments section of this previous cited tutorial, Rufat Gadirov explains how to use a generated XML from Eclipse instead of your XSD file as your source in Excel.
However, in spite of all the instructions, I am still facing the same issue in Excel when I try to save my file as XML : "The XML maps in this workbook are not exportable".
What I try to do is to create one or more Sales Orders with multiple Items in it from a XML File Input, using excel to enter data.
The part with the File input is working (if I directly upload my file to the webDAV, it creates a sales order instance with multiple items).
The only missing part is the Excel data input that I cannot make work. Any help on this matter would be greatly appreciated.
Here is my XML file that I try to use as a source in Excel before inputing data from Excel:
<?xml version="1.0" encoding="UTF-8"?>
<p:MySalesOrderUploadedIntegrationInputRequest xmlns:p="http://001365xxx-one-off.sap.com/YUUD0G3OY_" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MessageHeader>
<CreationDateTime>2015-03-02T12:00:00.000Z</CreationDateTime>
</MessageHeader>
<List actionCode="01" listCompleteTransmissionIndicator="true" reconciliationPeriodCounterValue="0">
<MySalesOrderUploaded>
<MySalesOrderUploadedID>idvalue0</MySalesOrderUploadedID>
<MyBuyerID schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeID="token">token</MyBuyerID>
<MyDateTime>2015-03-02T12:00:00.000Z</MyDateTime>
<MyName languageCode="EN">MyName</MyName>
<MyBillToParty schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyBillToParty>
<MyDateToBeDelivered>2001-01-01</MyDateToBeDelivered>
<MyEmployeeResponsible schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyEmployeeResponsible>
<MySalesUnit schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MySalesUnit>
<MyItem>
<MyItemID>token</MyItemID>
<MyItemProductID schemeAgencyID="token" schemeID="token">token</MyItemProductID>
<MyItemDescription languageCode="EN">MyItemDescription</MyItemDescription>
<MyProductTypeCode>token</MyProductTypeCode>
<MyRequestedQuantity unitCode="token">0.0</MyRequestedQuantity>
<MyConfirmedQuantity unitCode="token">0.0</MyConfirmedQuantity>
<MyNetAmount currencyCode="token">0.0</MyNetAmount>
</MyItem>
</MySalesOrderUploaded>
<MySalesOrderUploaded>
<MySalesOrderUploadedID>idvalue0</MySalesOrderUploadedID>
<MyBuyerID schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeID="token">token</MyBuyerID>
<MyDateTime>2015-03-02T12:00:00.000Z</MyDateTime>
<MyName languageCode="EN">MyName</MyName>
<MyBillToParty schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyBillToParty>
<MyDateToBeDelivered>2001-01-01</MyDateToBeDelivered>
<MyEmployeeResponsible schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MyEmployeeResponsible>
<MySalesUnit schemeAgencyID="token" schemeAgencySchemeAgencyID="1" schemeAgencySchemeID="token" schemeID="token">token</MySalesUnit>
<MyItem>
<MyItemID>token</MyItemID>
<MyItemProductID schemeAgencyID="token" schemeID="token">token</MyItemProductID>
<MyItemDescription languageCode="EN">MyItemDescription</MyItemDescription>
<MyProductTypeCode>token</MyProductTypeCode>
<MyRequestedQuantity unitCode="token">0.0</MyRequestedQuantity>
<MyConfirmedQuantity unitCode="token">0.0</MyConfirmedQuantity>
<MyNetAmount currencyCode="token">0.0</MyNetAmount>
</MyItem>
</MySalesOrderUploaded>
</List>
</p:MySalesOrderUploadedIntegrationInputRequest>
Thank you all for your attention.
Best regards.
Jacques-Antoine OllierHello Jacques-Antoine,
I suppose that as you have tried to construct a map from the schema, you have taken the elements from the List level down. In this case I also can't export the map.
But if you take the elements from the level MySalesOrderUploaded down, you'll get the exportable map (screenshots)
Best regards,
Leonid Granatstein -
How to convert DOM Tree in XML File
Hi there,
I am successful to build a DOM tree in memory where i am adding elements. Now after all this i want to make a XML file of that DOM representation. Now, i am confused with my code that how to transfer DOM structure to xml file ? A small code is attached herewith ?
doc = db.newDocument();
doc.normalizeDocument();
doc.setXmlVersion("1.0");
doc.createComment("Created By: Sachin Kulkarni");
Element rn = doc.createElement("RootNode");
Element n1 = doc.createElement("A1");
((Node)n1).setNodeValue("Element A1");
Element n11 = doc.createElement("A11");
((Node)n11).setNodeValue("Element A11");
Element n12 = doc.createElement("A12");
((Node)n12).setNodeValue("Element A12");
((Node)n1).appendChild( ((Node)n11) );
((Node)n1).appendChild( ((Node)n12) );
Element n2 = doc.createElement("A2");
((Node)n2).setNodeValue("Element A2");
Element n3 = doc.createElement("A3");
((Node)n3).setNodeValue("Element A3");
((Node)rn).appendChild( ((Node)n1) );
((Node)rn).appendChild( ((Node)n2) );
((Node)rn).appendChild( ((Node)n3) );
//creating the xml file
Source source = new DOMSource((Element) doc.getElementsByTagName("RootNode").item(0));
StringWriter out = new StringWriter();
StreamResult result = new StreamResult(out);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty("encoding", "iso-8859-1");
transformer.setOutputProperty("indent", "yes");
//transformer.setOutputProperty("test.xml","1");
//transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
transformer.transform(source,result);
result.getWriter().toString();
==================
Is it any problem with the implementation ? How to use fileoutputstream with this ?I have done like this:
DocumentBuilderFactory docBuildFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = docBuildFactory.newDocumentBuilder();
Document doc = builder.newDocument();
Element root = (Element)doc.createElement("Root");
doc.appendChild(root);
Element address = (Element)doc.createElement("Address");
address.appendChild((Element)doc.createElement("Street"));
address.appendChild((Element)doc.createElement("PostCode"));
address.appendChild((Element)doc.createElement("Town"));
Element country = (Element)doc.createElement("Country");
country.setAttribute("type","EU");
Text cname = doc.createTextNode("Spain");
country.appendChild(cname);
address.appendChild(country);
root.appendChild(address);
TransformerFactory tranFactory = TransformerFactory.newInstance();
Transformer aTransformer = tranFactory.newTransformer();
aTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
Source src = new DOMSource(doc);
Result dest = new StreamResult(new FileOutputStream(new File("test.xml")));
aTransformer.transform(src, dest); -
How to create Inbound Idoc from XML file-Need help urgently
Hi,
can any one tell how to create inbound Idoc from XML file.
we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml' we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
Please let me know the process to trigger inbound Idoc with out using XI and any other components.
Thanks in advance
Dora ReddyHi .. Did either of you get a result on this?
My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
I see lots of mention of using a Function Module.
Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
Or is there something tht can be done with Standard SAP?
Thanks
Lee -
Best way to handle .properties and .xml files
Hi,
I have an application which contains so many properties and XML files, these are a part of WAR file which we deployed in
tomcat server. Whenever we make changes to these properties and XML files we redeploy the app and start the server.
Is there any way we can make sure that these files can take changes without redeploying or starting the server?
Please clarify.
Thanks.Sure - keep them outside of the war. Pick any directory where you can put them (a directory where the server is allowed to read of of course), load them from that directory in your application. Make sure you can reach that directory through (S)FTP to easily be able to modify them. Then all you need is a way to reload them in the application, should the information be cached.
-
My "itunes library" folder is empty. My libray music (prior to upgrading itunes) is now in an .xml file in my itunes location under my music. How do I extract/convert this .xml file to a Itunes database and restore my Itunes music library??? Thanks, Tom
Empty/corrupt library after upgrade/crash
Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
When you get it all working make a backup!
tt2 -
How to convert database table into xml file
Hi.
How to convert database table into XML file in Oracle HTML DB.
Please let me know.
Thanks.This not really a specific APEX question... but I search the database forum and found this thread which I think will help
Exporting Oracle table to XML
If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
Hope this helps
Chris -
How to save infopath form in XML file
How to save InfoPath form in XML file.
I want every new record in InfoPath form save in XML file and also retrieve these records from XML like databasesHi,
Based on your description, my understanding is that you want to save InfoPath form in XML file.
I have done a test in my SharePoint, Do the following steps:
Create an form library and publish an InfoPath form into it, Then when we create new document into the form library, it is by default that InfoPath form is saved in XML file.
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
How to access system variables in Script Component in data flow task in SSIS
Hi,
I am new to SSIS. Can someone tell me how to access system variable in Script Component in SSIS using C# code.
ThanksYou can use the System.Environment.GetEnvironmentVariable(...) to read the variables. An example is here:
http://msdn.microsoft.com/en-us/library/y6k3c7b0.aspx
Vikash Kumar Singh || www.singhvikash.in
Maybe you are looking for
-
BackGround Job for Transaction VF06
Hi Experts, We are having problems with the background Job for transaction VF06. We run this job every day except weekends but this job runs and takes only 0 sec without creating Invoices. Allthough running this transaction Manually creates Invoice w
-
SRM SUS BSP Page "Compressing" when utilizing Download or Print fucntionali
Hi Gurus, We are currently facing an issues with multiple BSP application compressing the entire screen while utilizing out of the box print and download fucntionality.These BSP pages are standard SAP SUS applcaition such as Service Entry Shee
-
Content Server not working correctly
Hello, I am having problems with my Tandberg Content Server. For several years, we have used the Tandberg Content Server (TCS) in combination with our Tandberg Management Server (TMS) to schedule and record video conferences. I schedule 60 video conf
-
Some apps not compatible with this unit
I have some trouble with a couple of apps that aparently is not compatible with my z3 compact. But i have no trouble installing them on my android tablet(asus) Is it a regional setting on the phone i can change?
-
Transformation for BI Content Objects
Hi Friends, I have some transformation problem in BI 7.0, where i'm getting strucked. Actually in BW 3.5 i used to activate the datasource in R/3 and then replicate, once it is done then i used to take relevant BI Content Cube in the