Setting the XML tag value in Java script
Hi,
I am trying to set a XML tag value in the initialize event of a text field.. The code works fine in FormCalc but I needed it to work in java script.
FormCalc:
$record.prospectApplication.typeName = "namedInsured";
Java Script:
xfa.record.prospectApplication.typeName = "namedInsured";
The above JavaScript does not work. Can any one help on this?
Thanks
Srini
Hi Srini,
In JavaScript you don't get any default properties so you need to say;
xfa.record.prospectApplication.typeName.value = "namedInsured";
That is assign the value to the "value" property not the dataValue object.
Similar Messages
-
Add xml Tags by Apple/Java script
Hi,
All, I'm new to Indesign Scripting, and I'm hoping someone can help me with the following (add xml) problem.
Can anyone write/suggest me how i can add xml tags. By Apple/Java Script
My Probleam =>
[&x+2, y+3&]
Solution => (But its manual)
<inlineequation><inlinemediaobject><textobject role="xpressmath">[&x+2, y+3&]</textobject></inlinemediaobject></inlineequation>
I want add xml tags on my powermath equaiton. Its ETMV2 xml tags.
Any insight is appreciated!
Thank you so much
snegigHi John,
(1) Without xml tags my InDesign file
(2) After add tags my file (its manually)
Is this any script when i select my power math equation data then add xml tags automatically
Thank's any suggestion -
Validate the XML tag value and display the Binding data in XDP
Hi,
I am new to Adobe Life Cycle.... and i am working on the following requirement and XML file is enclosed...
1. Need to validate the XML value of <pp> with condition
2. Basing on the value of <pp>, need to display the <ct> values in text field
If i simply bind, it takes the values from top of array and display..
Please suggest how to restrict the binding values basing on the condition.
Thanks
MadhuHi Paul,
Thank you for quick respose.
The solution which you have give me not excatly looking for.... working for the solution in alternative methods...
Regards
madhu -
How to filter particular xml tag value using -DBMS_XMLGEN / DBMS_XMLSTORE
Hi,
I am using dbms_xmlgen and dbms_xmlstore package to extract xml datafile tag value from file server to oracle database table.
I have used the below pl/sql program to extract the xml tag values to oracle relational table.Its working fine for me.
But I would like to extract the values based on particular filter condition.
The following xml program I have 3 rows I would like extract the xml data based on the following condition .
Filter condition
==============
the tag <STATE_ABBREVIATION> value shuold be 'CA' and the <CITY> tag value should be Palo_Alto then I will store the ZIPCODE
ZIP_CODE_EXTN,STATE_ABBREVIATION tag values in the Oracle Relational table.
The below pl/sql program storing all the three rows but I required the values based on the filter condition that I mentioned earlier.
Kindly assist me what are the steps that I need to change in this program.?
XML Program file content.
======================
<ZIPCODES>
<mappings>
<STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
<ZIPCODE>94301</ZIPCODE>
<ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
<CITY>Palo_Alto</CITY>
</mappings>
<mappings>
<STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
<ZIPCODE>95302</ZIPCODE>
<ZIP_CODE_EXTN>9279</ZIP_CODE_EXTN>
<CITY>LA</CITY>
</mappings>
<mappings>
<STATE_ABBREVIATION>TX</STATE_ABBREVIATION>
<ZIPCODE>75038</ZIPCODE>
<ZIP_CODE_EXTN>7837</ZIP_CODE_EXTN>
<CITY>DALLAS</CITY>
</mappings>
</ZIPCODES>
PL/SQL Program for XML extract.
==========
declare
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp number;
insCtx DBMS_XMLStore.ctxType;
ctx dbms_xmlgen.ctxHandle;
v_FileHandle UTL_FILE.FILE_TYPE;
begin
v_FileHandle := utl_file.fopen('XMLTEST','XML_NEW_CITIES.XML','r') ;
loop
BEGIN
utl_file.get_line(v_FileHandle, charString);
exception
when no_data_found then
utl_file.fclose(v_FileHandle);
exit;
END;
dbms_output.put_line(charString);
if finalStr is not null then
finalStr := finalStr || charString;
else
finalStr := charString;
end if;
end loop;
insCtx := DBMS_XMLStore.newContext('SYS.ZIPCODES');
dbms_xmlgen.setRowsetTag(insCtx,'ZIPCODES');
dbms_xmlgen.setRowsetTag(insCtx,'mappings');
DBMS_XMLStore.clearUpdateColumnList(insCtx);
DBMS_XMLStore.setUpdateColumn(insCtx,'ZIPCODE');
DBMS_XMLStore.setUpdateColumn(insCtx,'ZIP_CODE_EXT N');
DBMS_XMLStore.setUpdateColumn(insCtx,'STATE_ABBREV IATION');
rowsp := dbms_xmlstore.insertXML(insCtx,finalstr);
end;
Thanks,
natThanks for your reply. :)
Its working fine in the DBMS_XMLSTORE package. Here I have given the code
CREATE OR REPLACE TYPE typ_dummy AS OBJECT
( "@ENO" NUMBER,
"@ENAME" VARCHAR2(100),
eno NUMBER,
ename VARCHAR2(100));
CREATE TABLE EMP
empno VARCHAR2(25),
sal NUMBER,
hiredate DATE,
typ TYP_DUMMY
DECLARE
insCtx DBMS_XMLStore.ctxType;
rows NUMBER;
xmldoc CLOB :=
'<ROWSET>
<ROW num="1">
<SAL>1800</SAL>
<EMPNO>739</EMPNO>
<HIREDATE>27-AUG-1996</HIREDATE>
<TYP ENO="739" ENAME="Nazurullah">
<ENO> 1 </ENO>
<ENAME> ALDRIN </ENAME>
</TYP>
</ROW>
<ROW>
<SAL>18000</SAL>
<EMPNO>7369</EMPNO>
<HIREDATE>27-AUG-1996</HIREDATE>
<TYP ENO="7369" ENAME="PEPPIN" />
</ROW>
<ROW>
<SAL>37000</SAL>
<EMPNO>20701</EMPNO>
<HIREDATE>27-AUG-1996</HIREDATE>
<TYP>
<ENO> 20701 </ENO>
<ENAME> VENKATACHALAM </ENAME>
</TYP>
</ROW>
</ROWSET>';
BEGIN
insCtx := DBMS_XMLStore.newContext('emp'); -- get saved context
-- Now insert the doc.
-- This will only insert into EMPNO, SAL and HIREDATE columns
rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
-- Close the context
DBMS_XMLStore.closeContext(insCtx);
END;
SELECT * FROM emp;
EMPNO SAL HIREDATE TYP(@ENO, @ENAME, ENO, ENAME)
739 1800 27-AUG-96 TYP_DUMMY(739, 'Nazurullah', 1, ' ALDRIN ')
7369 18000 27-AUG-96 TYP_DUMMY(7369, 'PEPPIN', NULL, NULL)
20701 37000 27-AUG-96 TYP_DUMMY(NULL, NULL, 20701, ' VENKATACHALAM ') -
Formating and calculating xml tag value
I have an xml file that holds xml tag such as <weight>.55 kg</weight>
I want to have two outputs:
Output 1) Output to print: 0.55
Output 2) Output to print 0.8 of the xml tag value (0.55 * 0.8) : 0.44
I was able to get the Output 1) by using <?format-number:weight;'9G990D00'?>
However, I can not get the Output2) as expected.
If I put <?format-number:(weight)*0.8;'9G990D00'?>,
I get the error message "Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert .55 kg to number."
Appreciate any help on how to solution for Output2)
Edited by: user4697912 on Jun 22, 2010 1:23 AM
Edited by: user4697912 on Jun 22, 2010 1:23 AMIf that is the case then try using
<?format-number:( substring-before(WEIGHT,'kg')*0.8);'9G990D00'?> -
How to get the value in the XML tag?
hi all,
i am new to JAXP. i tried the sample program provided in the following link. it just counts the number of tags in the XML file. XML file name is given as command line argument.
Now, if i want to display the value in the XML tag( say <NAME>xxx</NAME> in this tag i want to display the value 'xxx' ), what has to be done?
how can i achieve this?
please help...
link of the sample program:
http://xml.apache.org/~edwingo/jaxp-ri-1.2.0-fcs/samples/SAXLocalNameCount/SAXLocalNameCount.java
thx in advance,
-Soni.implement this method the same way you have startElement...
public void characters(char[] ch,
int start,
int length)
throws SAXException -
How to get the XML TAG name itself instead of TAG value
Hi All,
I have a question here
I want to retrieve the XML tag from a XML file instead of its value.
Example:
<item>Colgate</item>
Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
How to do that...?
Thanks
-PraveenYou can do this with an axes XPatch expression:
child::node()/name()
For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
HTH,
Bas -
How to get/read region item value in java script
Hi All,
i have text item on a page.
how to read the item value in java script
EXAMPLE
P10_RESULT IS ITEM IT HAS VALUE "38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888"
NOW I WANT TO REFER ABOVE ITEM VALUE IN JAVA SCRIPT LIKE
var myPoints=new Array(&P10_RESULT.);
SO I CAN POPULATE ARRAY WITH CORDINATES
IT IS NOT WORKING
WHAT IS THAT I AM MISSING.
PLESE HELP .
ThankS
Rkregion header code....
<script src="http://maps.google.com/maps?file=api&v=2&key=&API_KEY." type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
//globals
var bounds = new GLatLngBounds();
var map;
var centerPoint = new GLatLng(38.984898,-76.854549);
var gmarkers = [];
//var x= ""38.956472,-77.447777","38.999123,-//77.026184","12.951497,70.668646","17.459075,78.456888"";
//var myPoints=new Array(x);
//var myPoints=new Array($x('P10_RESULT').value);
var myPoints=new Array(document.getElementById('P10_RESULT').value);
//var myPoints=new Array("38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888");
function initMap()
doLoad();
addMarkers();
function doLoad()
if (GBrowserIsCompatible())
map = new GMap2(document.getElementById("map"));
map.setCenter(centerPoint, 7);
map.addControl(new GScaleControl());
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
function myclick(i) {
GEvent.trigger(gmarkers, "click");
function addMarkers() {
if (myPoints.length) {
var bounds = new GLatLngBounds();
for (n=0 ; n < myPoints.length ; n++ ) {
var mData = myPoints[n].split(',');
var point = new GLatLng(mData[0],mData[1]);
bounds.extend(point);
var marker = createMarker(mData[1],point, mData[0]);
map.addOverlay(marker);
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
function createMarker(i,point, title) {
var marker = new GMarker(point,{title:title});
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml('<div style="width:250px;">' + title + '<hr>Lat: ' + point.y + '<br>Lon: ' + point.x + '</div>');
gmarkers[i] = marker;
return marker;
//]]>
</script>
page body code
onload="initMap()" onunload="GUnload()" -
How to get the anchor tag values in next jsp
Hey all,
I have two jsp files.
in first jsp,
I am getting the resultset.
I am setting the resultset to the anchor tag.
below is the code...
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp"><%=rSet.getString(1) %></a></td>
whenever he click on any anchor tag,
It will goes to ACSMasterTwo.jsp page for edit the compleate record.
how to get the anchor tag value in that page...
Please help me on this.You have to pass a parameter. An id is good.
Of course you have to get an id from somewhere in the result set right?
<a target="_top" rel="contents" rev="contents" class="fordynamiclabel" href="ASCMasterTwo.jsp?id=<%= rSet.getString("id") %>"><%=rSet.getString(1) %></a></td>Then you call
request.getParameter("id");
and look up the values related to that id in the database. -
HowTo Set the xml-stylesheet processing instruction node?
Hi,
Can anyone tell me via PLSQL XMLDOM object what method or attribute to set or howto specify the xml-stylesheet value at the time of generation of the xml document?
eg
<?xml version = '1.0'?>
<?xml-stylesheet type="text/xsl" href="reporthtml.xsl"?>
<Report>
<Title>ABC Report</Title>
</Report>
Currently my XML just comes out as
<?xml version = '1.0'?>
<Report>
<Title>ABC Report</Title>
</Report>
and I want to add the stylesheet reference....
<?xml-stylesheet type="text/xsl" href="reporthtml.xsl"?>
Any help is appreciated...A COTS product builds the XML and inserts the respective xsl (xml:stylesheet) file name to be used for transforming the xml. I am trying to interrupt this xml and make some updations on an element and finally send the updated xml to the stream.
For the above process, I parse the input XML using DOMParser and update the elements (some internal elements). While I view the final XML that would be passed to the stream, I found the <?xml-stylesheet... PI is missing.
I somehow managed using a temp fix by doing the below. I manually pulled the PI using document.getFirstChild().getNodeValue() and reconstructed the PI and inserted it to the outgoing XML. This needs to be done every time. This might run into problems when more than one PI is used in the XML.
If the parsed XML could get the PI along with it the above problem could be resolved.
Is there any property that could be set on the parser (prior to parsing) to resolve the issue?. -
How to form a regular expression for matching the xml tag?
hi i wanted to find the and match the xml tag for that i required to write the regex.
for exmple i have a string[] str={"<data>abc</data>"};
i want this string has to be splitted like this <data>, abc and </data>. so that i can read the splitted string value.
the above is for a small excercise but the tagname and value can be of combination of chars/digits/spl symbols like wise.
so please help me to write the regular expression for the above requirementyour suggestion is most appreciable if u can give the startup like how to do this. which parser is to be used and stuff like that
-
Hi,
Unfortunately the xml tags deleted in my document (full content), if it possible to recover?sorry for irking so much..
i did like this..
NodeList childNodes = e.getElementsByTagName("objectstore");
for(int s=0; s<childNodes.getLength() ;s++)
Element el = (Element)childNodes.item(s);
NodeList nl2 = el.getElementsByTagName("name");
for(int i = 0; i < nl2.getLength(); i++)
Node nN = nl2.item(i);
if(nN.hasChildNodes())
NodeList listL = nN.getChildNodes();
for(int j = 0; j < listL.getLength(); j++)
Node nN2 = listL.item(j);
String name =nN2.getNodeValue();
out.println(name);
in this way iam getting the name tag value as well as the value of name tag which is in properties node.i want to display only one name tag value which is after the id tag..how can prevent this. -
Unable to define the XML tags with colon in XPath using gluecode
Hi Everyone,
I am working on XML with InDesign CS4. I need to do some automation stuffs for those. In my InDesign document, the XML tags (Eg. <ab:para>, <ab:figure> & etc…) name contains colon characters. If i try to loop these tags through gluecode using XPath expression, the script throws me a error like 'Adobe InDesign cannot processXPath expression'.
Can anyone look into this and suggest me a right solution.
Thanks in advance.
ThiyaguHi thiyagu,
this.xpath = "//para";
this.xpath = "//figure";
Try this without the XML namespace in XPath Expression. it's not tested code, but it may works.
Regards,
Nagaraj -
How to Find the XML Tag in indesign
HI!!<br /><br />We are working with XML work flow in indesign. In indesign how could we find the XML Tag in indesign.<br /><br />Example::<br />In the Below list we could have to find the xml tag <chapter> in story editor or in the main text frame in indesign using find option. Kindely sent if any Plugins is available.<br /><br />For exmaple:<br />************<br /><book><br /> <part><br /> <chapter><br /> <head><br /> <para><br /> <bold><br /><br />Thanks,<br />C.K.Venkatesan
I imported the xml file in vb.net. now i want to find the number of pages and no. of elements. i found out it. but i was not able to find which elements are placed in which page. i want that information. plz kindly help. i am using vb.net. for eg. <ce:figure> placed in which page no., <ce:sections> placed in which page no., etc..,
-
Set the default field value to transaction code field, when calling from WD
Hi all,
Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
Is there any way to set the default field value to transaction code field, when calling from WD?
Please suggest, if anyone have any idea.
Thanks
SanketHi,
I am using the below code to open a standard transaction. It will help you to explain my point more easily.
DATA: url TYPE string,
host TYPE string,
port TYPE string.
*Call below method to get host and port
cl_http_server=>if_http_server~get_location(
IMPORTING host = host
port = port ).
*create URL
CONCATENATE 'http'
'://' host ':' port
'/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
INTO url.
*get the window manager as we are opening t code in external window.
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
call the url which we created above
lo_window_manager->create_external_window(
EXPORTING
url = url
RECEIVING
window = lo_window ).
lo_window->open( ).
Note*
One more query I want to add to this thread, that is there any possibility to call a custom transaction as well?
Maybe you are looking for
-
My Macbook is currently running extremely slowly. Its a 320GB, 2Ghz $GB Ram and is only a year old. I have purchased "Clean my Mac" and it has made no difference. It regularly comes up with the beach ball loading symbol. I have carried out both permi
-
Iphone 5 in recovery, cannot switch on, help!
Please help my iphone 5 won't switch on - the screen displays a lead and an arrow pointing to the iTunes icon! I cant recover my serial number from my itunes account - not sure what my next steps should be...??
-
MapInfo (MIF) to Oracle Spatial
Has anyone ever worked on converting MapInfo Export files (MIF) to Oracle spatial? If so could you give me a step by step process on how to do this? I am interested in taking a point file and converting to oracle spatial.
-
Smart or conditional presets; we can already run presets as import goes along. This is really useful, but many photos don't fit into a standard preset. sometimes exposures are off, sometimes cropping is not based on bottom left corner etc. I try to b
-
All I am unable to view any labels on the any of the custom XML forms or the SAP devlivered forms when I preview the forms on our dev system. The fields are showing up but the labels are not Anyone with any ideas on why this is happening? Thanks