Appending XML Node
Hi All,
My Database Details,
BANNER
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
SQL> var mycnt number
SQL> exec :mycnt := 2
SQL> declare
xml xmltype := xmltype('
<EMP>
<NAME>
</NAME>
<SALARY>
<DATE></DATE>
<AMOUNT></AMOUNT>
</SALARY>
</EMP>');
l_sal long := '<SALARY><DATE></DATE><AMOUNT></AMOUNT></SALARY>';
l_str long;
begin for i in 1 .. :mycnt
loop
l_str := l_str || l_sal;
end loop;
xml := xmltype(replace (xml.getstringval(), '</EMP>', l_str || '</EMP>'));
dbms_output.put_line (xml.extract('.').getstringval());
end;
<EMP>
<NAME/>
<SALARY>
<DATE/>
<AMOUNT/>
</SALARY>
<SALARY>
<DATE/>
<AMOUNT/>
</SALARY>
<SALARY>
<DATE/>
<AMOUNT/>
</SALARY>
</EMP>
This program is working fine. Consider the following scenario...
My XML is like this,
<ABC>
<AB> -- First element
<CCC></CCC>
</AB>
<AB> -- Second element
<CCC></CCC>
</AB>
</ABC>
Now i want to replicate the tag of <CCC></CCC>
to 'N' TIMES from XPATH = /A/AB[1]/CCC and /A/AB[2]/CCC
For example if N=3 then, the XML should be,
<ABC>
<AB>
<CCC></CCC>
<CCC></CCC>
<CCC></CCC>
</AB>
<AB>
<CCC></CCC>
<CCC></CCC>
<CCC></CCC>
</AB>
</ABC>
Please provide me some Sample PLSQL code for this,
Thanks in Advance,
Simbhu
Please read XML DB FAQ. 9.2.0.3.0 is the minimum support release for XDB
Similar Messages
-
Appending XML node in bpel.
Hi,
I have a transform activity that creates a XML as below:
<Students>
<Student>
<Name>A</Name>
<Age>123</Age>
</Student>
</Students>
After that i need to use an assign activity to append another student node with output as below:
<Students>
<Student>
<Name>A</Name>
<Age>123</Age>
</Student>
<Student> <!-- This is the appended node -->
<Name>C</Name>
<Age>452</Age>
</Student>
</Students>
let me know how to achieve this using bpel assign activity.
Thanks.It's something like this...
Variable_1
<list>
<data>aa</data>
<data>bb</data>
</list>Variable_2
<list>
<data>1</data>
<data>2</data>
</list>Then you put an append in your ASSIGN activity
<bpelx:append>
<bpelx:from variable="Variable_2" query="/list/*"/>
<bpelx:to variable="Variable_1" query="/list"/>
</bpelx:append>And you get this as result...
<list>
<data>aa</data>
<data>bb</data>
<data>1</data>
<data>2</data>
</list>Cheers,
Vlad -
Appending XML Node to XMLTYPE Variable
Hi All,
My Database Details,
BANNER
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
SQL> var mycnt number
SQL> exec :mycnt := 2
SQL> declare
xml xmltype := xmltype('
<EMP>
<NAME>
</NAME>
<SALARY>
<DATE></DATE>
<AMOUNT></AMOUNT>
</SALARY>
</EMP>');
l_sal long := '<SALARY><DATE></DATE><AMOUNT></AMOUNT></SALARY>';
l_str long;
begin for i in 1 .. :mycnt
loop
l_str := l_str || l_sal;
end loop;
xml := xmltype(replace (xml.getstringval(), '</EMP>', l_str || '</EMP>'));
dbms_output.put_line (xml.extract('.').getstringval());
end;
<EMP>
<NAME/>
<SALARY>
<DATE/>
<AMOUNT/>
</SALARY>
<SALARY>
<DATE/>
<AMOUNT/>
</SALARY>
<SALARY>
<DATE/>
<AMOUNT/>
</SALARY>
</EMP>
This program is working fine. Consider the following scenario...
My XML is like this,
<ABC>
<AB> -- First element
<CCC></CCC>
</AB>
<AB> -- Second element
<CCC></CCC>
</AB>
</ABC>
Now i want to replicate the tag of <CCC></CCC>
to 'N' TIMES from XPATH = /A/AB[1]/CCC and /A/AB[2]/CCC
For example if N=3 then, the XML should be,
<ABC>
<AB>
<CCC></CCC>
<CCC></CCC>
<CCC></CCC>
</AB>
<AB>
<CCC></CCC>
<CCC></CCC>
<CCC></CCC>
</AB>
</ABC>
Please provide me some Sample PLSQL code for this,
Thanks in Advance,
Simbhunot sure that this is waht you want - but maybe you find smth useful:
SQL> set serveroutput on;
SQL>
SQL> declare str xmltype:=xmltype('<ABC><AB><CCC></CCC></AB><AB><CCC></CCC></AB><AB><CCC></CCC></AB></ABC>');
2 begin
3 for i in 1..2
4 loop
5 select InsertChildXML(str, '/ABC/AB['||i||']', 'CCC', XMLForest('' as "CCC",'' as "CCC")) into str from dual;
6 end loop;
7 dbms_output.put_line(str.extract('.').getstringval());
8 end;
9 /
<ABC>
<AB>
<CCC/>
<CCC/>
<CCC/>
</AB>
<AB>
<CCC/>
<CCC/>
<CCC/>
</AB>
<AB>
<CCC/>
</AB>
</ABC>
PL/SQL procedure successfully completed
SQL> -
Hi,
In an embedded sub process with looping logic, we have a db adapter call.
We are trying to insert the single response object from each of the db adapter call into a list.
Problem we are facing is the list is not able to append the new db response into the list.
AppendToList is not of help. XSLT construct copy-to was not of help.
Using the following three messages
Msg1: - Loop Interation 1
<elementCollection>
<element>aaa</element>
</elementCollection>
Msg2: - Loop Interation 2
<elementCollection>
<element>bbb</element>
</elementCollection>
Msg3: - Loop Interation 3
<elementCollection>
<element>ccc</element>
</elementCollection>
to be inserted into the following message
Result: - After all the iterations
<elementCollection>
<element>aaa</element>
<element>bbb</element>
<element>ccc</element>
</elementCollection>
Any help/pointers will be appreciated.
Edited by: 905033 on Jul 4, 2012 10:32 PM
provided sample messages
Edited by: 905033 on Oct 23, 2012 2:55 AMPlease see the transformation bellow... I've built a quick sample and it worked for me.
Cheers,
Vlad
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
https://forums.oracle.com/forums/ann.jspa?annID=893
<xsl:stylesheet version="1.0"
<xsl:param name="Variable_2"/>
<xsl:param name="Variable_3"/>
<xsl:template match="/">
<ns0:elementCollection>
<xsl:for-each select="ns0:elementCollection/ns0:element">
<ns0:element>
<xsl:value-of select="."/>
</ns0:element>
</xsl:for-each>
<xsl:for-each select="$Variable_2/ns0:elementCollection/ns0:element">
<ns0:element>
<xsl:value-of select="."/>
</ns0:element>
</xsl:for-each>
<xsl:for-each select="$Variable_3/ns0:elementCollection/ns0:element">
<ns0:element>
<xsl:value-of select="."/>
</ns0:element>
</xsl:for-each>
</ns0:elementCollection>
</xsl:template>
</xsl:stylesheet> -
How I can append new node in existing XML file
I've just begun learning DOM XML , so I'm currently at a very beginner level.
I have an existing XML file that I would like to add an additional node to before saving it to another variable.
how I can append new node in this file.
now this code is overwrite new data over old data
The code looks like this:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class VerbXMLWriter
static String EVerb3;
static String englishTranslate3;
public void VerbXMLWriter(String EVerb, String englishTranslate )
EVerb3 = EVerb;
englishTranslate3=englishTranslate;
File xmlFile = new File("VerbDB.xml");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element root = document.createElement("Verb");
document.appendChild(root);
Element verb = document.createElement(EVerb3);
verb.setAttribute("EnglishTranslate",englishTranslate3);
root.appendChild(verb);
Source xmlSource = new DOMSource( document );
Result result = new StreamResult( new FileOutputStream(xmlFile) );
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer =
transformerFactory.newTransformer();
transformer.setOutputProperty( "indent", "yes" );
transformer.transform( xmlSource, result );
catch(TransformerFactoryConfigurationError factoryError )
factoryError.printStackTrace();
catch (ParserConfigurationException pc)
pc.printStackTrace();
catch (IOException io)
io.printStackTrace();
catch(Exception excep )
excep.printStackTrace();
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Verb>
<Play EnglishTranslate="playing" />
</Verb>Edited by: itb402 on Mar 9, 2008 6:05 AMin your code you are already appending new nodes to the root node. so what exactly is your problem? The following steps are usually taken for appending a new node:
1. Read the XML document
2. Build a DOM tree
3. Navigate to the node under which you want to insert the new node
4. Create a new node.
5. Insert the new node to the node selected in point #3.
~Debopam -
Ok. After solve the problem of append to files using a file adapter in osb (Re: Write/Append text file with OSB now i want to know if there is some way to append elements to an existant xml. For each request i will have the following message:
<root_node>
<msg>
<element />
<element />
<inner>
<inner_data />
</inner>
<inner>
<inner_data />
</inner>
<msg>
</root_node>
And, for two requests ai want to log:
<root_node>
<msg>
<element />
<element />
<inner>
<inner_data />
</inner>
<inner>
<inner_data />
</inner>
<msg>
<msg>
<element />
<element />
<inner>
<inner_data />
</inner>
<inner>
<inner_data />
</inner>
<msg>
</root_node>
And no:
<root_node>
<msg>
<element />
<element />
<inner>
<inner_data />
</inner>
<inner>
<inner_data />
</inner>
<msg>
</root_node>
<root_node>
<msg>
<element />
<element />
<inner>
<inner_data />
</inner>
<inner>
<inner_data />
</inner>
<msg>
</root_node>
As i'm doing (in my tests).
Thank you.do you want to append/insert nodes in the file
or do you want to construct that xml first in the osb and after that insert the xml in the file ?
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html
Message Processing Actions
Insert activity
you can use the insert activity to insert/append xml parts in your payload, and when the format is done, write it to the file -
Converting java.lang.String to a XML Node
Hi,
how do you convert a straight forward string like ..
"<nodename>this is the node value</nodename>" to a org.w3c.dom.Node....??
This way it would be easier to use appendNode() to add temporary nodes & build up a document.ur app will perform poor if u r going to instantiate
Document builder often.and u cant append the node ,like
the way u r trying do.
the node has to belong to the same document.
u have to necessarily create node/text node, from this document and append it .
Option two: read content from 1 file as a string append
the second value from dealer_info and then create a document from the result String.but make sure ur string is in valid XML format.
HTH
vasanth-ct
Ok let me tell you what exactly i want to do, so that
you can advise me better. Please tell me, what could
be done to avoid the error below.
//start from an existing template xml file
Document d =
parseXmlFile("D:/www/Detailcache/detail.xml", false);
Node root=d.getFirstChild();
//append dealer information to the root node
Node dnode=getDealerInfo(currentDealer);
System.out.println("Node
Info-->"+dnode.getNodeName());
root.appendChild(dnode);
//<-------------------Line175
//Dealerinfo module returning the parent node
public Node getDealerInfo(DealerInfo currentDealer) {
try {
DocumentBuilderFactory factory =
ctory = DocumentBuilderFactory.newInstance();
String
String dealer_info="<dealer_info><dealer_address>930
Rockbridge
ave</dealer_address><dealer_country>USA</dealer_countr
</dealer_info>";byte buf[] = dealer_info.getBytes();
ByteArrayInputStream in = new
n = new ByteArrayInputStream(buf);
BufferedInputStream bis = new
s = new BufferedInputStream(in);
Document dealer_info_doc =
o_doc = factory.newDocumentBuilder().parse(bis);
Node dealer_info_node=
o_node= dealer_info_doc.getFirstChild();
return dealer_info_node;
} catch (Exception e) {e.printStackTrace();}
return null;
My problem is 'root.appendChild(dnode);' returns an
error :
Node Info-->dealer_info
org.apache.crimson.tree.DomEx: WRONG_DOCUMENT_ERR:
That node doesn't belong in this document.
at
org.apache.crimson.tree.ParentNode.checkDocument(Unkno
n Source)
at
org.apache.crimson.tree.ParentNode.appendChild(Unknown
Source)
at
com.boatventures.inventory.servlet.XmlServlet.showPage
XmlServlet.java:175)
at
com.boatventures.inventory.servlet.XmlServlet.doGet(Xm
Servlet.java:64)
at
javax.servlet.http.HttpServlet.service(HttpServlet.jav
:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.jav
:853)
at
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417)
at
allaire.jrun.session.JRunSessionService.service(JRunSe
sionService.java:1106)
at
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:127
at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunN
medDispatcher.java:39)
at
allaire.jrun.servlet.Invoker.service(Invoker.java:84)
at
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417)
at
allaire.jrun.session.JRunSessionService.service(JRunSe
sionService.java:1106)
at
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:127
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRu
RequestDispatcher.java:89)
at
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1557)
at
allaire.jrun.servlet.JRunSE.service(JRunSE.java:1547)
at
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.ja
a:364)
at
allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java
388)
at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
at
allaire.jrun.WorkerThread.run(WorkerThread.java:75) -
How to binding incoming xml node list to the tree control as dataProvider
Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
Please see the presudo-code here:
1. Model layer(CsModel.as)
public class CsModel
[Bindable]
public var treeXML:XML=<nodes><car label="virtualOne" id="1">
</car></nodes>;
(Here, I want to build binding relationship on the <car/> node,
one 'virtual/stub' node is set here with lable="virtualOne".
But this node will be deleted after IdTree
control is created completely.)
[Bindable]
public var treeData:XMLList =new XMLListCollection(treeXML.car);
2. view layer(treePage.mxml)
private var _model:CsModel = new CsModel();
private function addNode():void
var newNode:XML=<car/>;
newNode.@label="newOne";
newNode.@id=1;
_model.treeXML.appendChild(newNode);
private function cleanData():void
delete _model.treeXML.car;
<mx:VBox height="100%" width="100%">
<mx:Button label="AddNode" click="addNode()" />
<mx:Tree id="IdTree" labelField="@label"
creationComplete="cleanData()"
dataProvider="{_model}"/>
</mx:VBox>
3. Top view layer (App.Mxml)
<mx:application>
<treePage />
</mx:application>
For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?If u want to display the name : value then u can do like this
<xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" /> -
SQL Server Agent Failed to decrypt protected XML node
I'm getting the below error when trying to run sql server agent to run an SSIS package. I've updated folder security to allow sql server agent access, but cannot get the package to execute within SQL Management Studio. The package runs find in SSIS.
11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 12:12:00 PM Error: 2014-11-30 12:12:02.65 Code: 0xC0016016 Source: LoadStgProspects Description:
Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that
the correct key is available. End Error Error: 2014-11-30 12:12:03.88 Code: 0xC0016016 Source: LoadStgProspects Description: Failed to decrypt protected XML node "DTS:Password" with error
0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2014-11-30
12:12:04.74 Code: 0xC0209303 Source: LoadStgProspects Connection manager "Excel Connection Manager" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver
is not installed<c/> run the package in 32-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
End Error Error: 2014-11-30 12:12:04.74 Code: 0xC020801C Source: Load prospect files Prospect xls [231] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection
method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error:
2014-11-30 12:12:04.74 Code: 0xC0047017 Source: Load prospect files SSIS.Pipeline Description: Prospect xls failed validation and returned error code 0xC020801C. End Error Error: 2014-11-30 12:12:04.74
Code: 0xC004700C Source: Load prospect files SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2014-11-30 12:12:04.74 Code: 0xC0024107 Source:
Load prospect files Description: There were errors during task validation. End Error Error: 2014-11-30 12:12:04.74 Code: 0xC00220DE Source: LoadStgProspects Description: Error
0xC0012050 while loading package file "C:\Users\Jim\Documents\Visual Studio 2010\Projects\SSISTraining\SSISTraining\LoadStgProspects.dtsx". Package failed validation from the ExecutePackage task. The package cannot run. . End Error DTExec:
The package execution returned DTSER_FAILURE (1). Started: 12:12:00 PM Finished: 12:12:04 PM Elapsed: 4.337 seconds. The package execution failed. The step failed.,00:00:04,0,0,,,,0Hi selfdestruct80,
According to your description, you created SSIS package and it works fine. But you got the error message when the SSIS package was called from a SQL Server Agent job.
According to my knowledge, the package may not run in the following scenarios:
The current user cannot decrypt secrets from the package.
A SQL Server connection that uses integrated security fails because the current user does not have the required permissions.
File access fails because the current user does not have the required permissions to write to the file share that the connection manager accesses.
A registry-based SSIS package configuration uses the HKEY_CURRENT_USER registry keys. The HKEY_CURRENT_USER registry keys are user-specific.
A task or a connection manager requires that the current user account has correct permissions.
According to the error message, the SSIS Package ProtectionLevel property to EncryptSensitiveWithPassword as ArthurZ mentioned. To solve the problem, you need to go to Command Line tab, manually specify the paassword in SQL Agent Job with the command like below:
/FILE "\"C:\Users\xxxx\Documents\SQL Server Management Studio\SSIS\Package.dtsx\"" /DECRYPT somepassword /CHECKPOINTING OFF /REPORTING E
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
Convertion of String to XML node using Xquery transformation in OSB
How to convert string to XML node elementusing a built in function using Xquery transformation in OSB?
check this out - http://www.javamonamour.org/2011/06/fn-beainlinedxml.html
if in SOA (BPEL & Mediator) you can use oraext:parseXML.
you should thoroughly analyse where to implement your requirement as some good practices advise to implement more complex logic in SOA and leave OSB to only connect to the services' endpoints.
Hope this helps,
A. -
Using XSLT to extract value of a XML node with namespace
I have a XML source code here.
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:job="http://www.pageuppeople.com">
<channel>
<title>SMH Jobs</title>
<link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
<description>A listing of jobs available here</description>
<item>
<title>eCommerce Optimisation Advisor</title>
<description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
<job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
</item>
</channel>
</rss>
I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
<xsl:value-of select="job:location" disable-output-escaping="yes"/>
<xsl:value-of select="job/location" disable-output-escaping="yes"/>
<xsl:value-of select="job\location" disable-output-escaping="yes"/>
<xsl:value-of select="location" disable-output-escaping="yes"/>
This might be an easy question for you, but I would appreciate if anyone can help.Hi Suncorp IT Learner,
We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
<xsl: value-of select=”job:location/@PUReferenceID”/>
In following issue, Chriztian has a good explanation:
http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
Thanks,
Qiao Wei
TechNet Community Support -
Getting Error 'Root XML Node nqw not found in island!'
I have upgraded my setup from OBIEE 11.1.1.5.0 to 11.1.1.5.1 and then uploaded a catalog created in older version, 11g itself.
I'm able to run the dashboards and see all reports. They run absolutely fine, show all correct data.
However if I try to edit report or try to open them in Answers module .... from anywhere (Catalog Link/ Edit option below reports in Dashboard) it gives me this error.
" Root XML Node nqw not found in island! "
It's strange. I tried following:
1. doing a Upgrade of catalog by setting up parameter in instanceconfig.xml file
<Catalog>
<UpgradeAndExit>true</UpgradeAndExit>
</Catalog>
and then reverting back to false.
2. Also tried the GUID upgarde by setting parameters in instanceconfig.xml file and NQSConfig.ini file
none helped.
Any help?Hi Naresh,
I hope you have resolved the issue by this time.
In my case, it was related to an invalid filter on the report.
I have removed the filter by updating the report .xml file from Catalog Manager.
Hope this helps other with similar issue.
Thanks,
Ravi -
How to create xml nodes based on a value
Dear friends,
I've a question about graphical mapping in SAP PI...
How can I create XML nodes on the target side based on a value in a XML field on the source side.
For example:
This XML field on the source:
<NO_OF_LINES>4</NO_OF_LINES>
Must result on 4 Lines on the Target:
<LINE></LINES>
<LINE></LINES>
<LINE></LINES>
<LINE></LINES>
So it's actually the opposite of the Count function...
I appreciate your help,
Thank you in Advance,
Kind regards,
JohnHi ,
Try this
NO_OF_LINES---> count---> UDF---> LINE
example :
UDF Code :
for (int i=0;i<var1[0];i++)
result.addValue(""); -
Xml in JTree: how to not collpase JTree node, when renaming XML Node.
Hi.
I'm writing some kind of XML editor. I want to view my XML document in JTree and make user able to edit contents of XML. I made my own TreeModel for JTree, which straight accesses XML DOM, produced by Xerces. Using DOM Events, I made good-looking JTree updates without collapsing JTree on inserting or removing XML nodes.
But there is a problem. I need to produce to user some method of renaming nodes. As I know, there is no way to rename node in w3c DOM. So I create new one with new name and copy all children and attributes to it. But in this way I got a new object of XML Node instead of renamed one. And I need to initiate rebuilding (treeStructureChanged event) of JTree structure. Renamed node collapses. If I use treeNodesChanged event (no rebuilding, just changes string view of JTree node), then when I try to operate with renamed node again, exception will be throwed.
Is there some way to rename nodes in my program without collpasing JTree?
I'am new to Java. Maybe there is a method in Xerces DOM implementation to rename nodes without recreating?
Thanks in advance.I assume that "rename" means to change the element name? Anyway your question seems to be "When I add a node to a JTree, how do I make sure it is expanded?" This is completely concerned with Swing, so it might have been better to post it in the Swing forum, but if it were me I would do this:
1. Copy the XML document into a JTree.
2. Allow the user to edit the document. Don't attempt to keep an XML document or DOM synchronized with the contents of the JTree.
3. On request of the user, copy the JTree back to a new XML document.
This way you can "rename" things to the user's heart's content without having the problem you described. -
How to set the value in the xml node.
Hi
I am having the application PDF which can be submitted by user using the button. while submitting
i am using below code to set the value in the xml node.
xfa.data.assignnode("employee.id","123",0):
So its generating the xml like below.
<employee>.
<id>123</id>.
</name>
</employee>
Now i need to generate the xml like below.
<employee id= "123" >
</Name>
</employee>
So how to set/create the id node like above?
Advance Thanks.
Regards,
DhiyaneHi Dhiyane,
You will have to set the contains property if the id node to "metaData", that is;
xfa.data.assignNode("employee.id","123",0);
xfa.data.employee.id.contains = "metaData";
Very clumsy if you have a number of them, in which case you might want to look at using E4X.
Good luck
Bruce
Maybe you are looking for
-
Windows XP - Thumbnails and nForce in general
For some reason when I select a video file (mpg or divx so far, probably most others too) and XP does it's thing to retrieve the thumbnail and details I have explorer getting locked into a loop and taking 100% of my CPU time as well as the RAM usage
-
Preview vs adobe acrobat - choosing default pdf viewer
when i download a pdf document and then click to open it, by default it opens using preview. how do i disable that and make adobe acrobat my default pdf viewer? Macbook Mac OS X (10.4.9) iPod 30Gb color
-
When I upgraded to iOS7, the images produced by the panorama feature of the camera turned bluish (slightly similar to a night mode using low end phone cameras). I already downloaded the latest updates on iOS7. Images from the normal camera and the sq
-
Does anyone know how to contact itunes festival? Got two tickets for tomorrows gig, but no email confirmation with tickets on yet...
-
Hello everyone, I'm having a weird problem with my new Lenovo G580 model 2189. Long story short: my laptop has Win8 installed, and the webcam was working fine on the first use of the laptop. A few weeks later I installed a SSD and removed the DVD uni