MII XML to XML - How?
Hi
I am using an action block Advanced Flat File to MII XML from Salvatore Castro. Does anyone has experience in it?. The action block simply returns an xMII XML by parsing after parsing an flat file (csv for eg).
However the the returned XML is an xMII XML (but in the link editor there is not data structure of the xMII XML).
I thought of using reference document to map the output but I think reference document could not parse xMII XML.
anyone has any idea??
thanks
Seng,
Perhaps you may have mixed up the purpose of the reference document, it works for me on my system, so let me explain how it works. The reference document assignment is designed to allow you to define a structure of an XML input/output transaction property or Incoming/Outgoing elements of an action. To use this assignment you have to have an XML defined that represents the XML you want to assign. For example create a Local Property called "FlatFileXMLReference" of Type XML and give it the expected value of the FlatFileParser action. Next in the workbench assign the Local property as a reference document to the OutputXML of the FlatFileParser action. Now in the link editor you will see the output XML populated with the value of the local property.
This is purely a design time feature that is to help you in defining links and will not affect the runtime environment of the transaction.
Hope this helps,
Sam
Similar Messages
-
I want to load a sales order from xml file. How can I do.
Hi,
I want to load a sales order from XML file. How can I do ? how can i create the sales order?
what are the necessary setting for create the sales orders.
with Regards,
Prakesh.Three options come to my mind.
Option 1: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (BAPI) and Program (CREATEFROMDAT2).
Option 2: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (DINP) and Program (RVINVB10).
Option 3: Translate the xml to IDoc so that ORDER04 / ORDER05 Idoc can be used to create Sales order (WEDI transaction). -
After migration to a new Mac Pro Dreamweaver CS6 won't launch. It says it is missing menus.xml file. How do I resolve this?
Hi rustyg12,
Go to Applications/Adobe Dreamweaver CS6/Configuration/Menus/menus.bak
You'll see a menus.xml there - it is a backup copy of the actual menus.xml file that DW uses.
Copy it from that folder, paste it 1 level above (in Menus folder).
Fire up DW. See if it works. -
How to insert Text physically to xml in xml Element
hello friends,
I am newb of jDom. i am trying to change xml "Element's"--->"Text". My xml is as follows .....
<?xml version ="1.0">
<Elements>
<code>
<data>EE550</data>
</code>
</Elements> I am trying to replace that "<data>" by <data>AA550</data>
my code is as below
SAXBuilder sb = new SAXBuilder();
Document doc = sb.build(new File("src/xml/M90EE.xml"));
Element element = doc.getRootElement();
List children = element.getChildren();
String key = (element.getChild("text").getChild("mkey").setText("AA550").getTextTrim()); System.out.println("mkey :"+key);
output:
mkey :AA550 but is it possible to change in the xml file phisically.
thanQ
Ajayhello Reegz,
ThanQ so much for perfect solution....
when i do like that it is actually adding text to the existing Element Text.. so i wrote as follows....
SAXBuilder sb = new SAXBuilder();
Document doc = sb.build(new File("src/xml/M90EE.xml"));
*String skey = (element.getChild("text").getChild("mkey").removeContent().toString());* //--------->step 1
*String skey1 = (element.getChild("text").getChild("mkey").addContent("ISO9001").toString());* //-------->step 2
String rdmkey = (element.getChild("text").getChild("mkey").getTextTrim());
XMLOutputter serializer = new XMLOutputter();
String str = serializer.outputString(doc);
FileWriter fr = new FileWriter("src/xml/M90EE.xml");
fr.write(str);
fr.flush();
fr.close();Is there any other way to replace text in step1 and step2 other than above or will it be enough for multiuser programming. Because this application will be accessed by so many number of user's what do u sujjest.
thanQ ...
Han. -
How to generate map.xml,toc.xml, help.hs file
Hi All,
In our application, we have all the help written in html files. I have the steps to configure ohw-config.xml, web.xml . We want to map the html help based on the application page name.
Can anyone let me know the good tool to generate map.xml,toc.xml for the html files.try magichelp.
it is multi-user help authoring tool,
currently Support Oracle help .
Home:http://www.gethelpsoft.com
Download from:http://www.gethelpsoft.com/download/mhtrial.exe
MagicHelp is multi-user help systems and documentation tool,it is the fastest, easiest way to create professional Help systems and documentation.
Support export format:CHM/MsHelp2.x/Word/WebHelp/JavaHelp/OracleHelp/EclipseHelp...
Support import format:COM TypeLib/FileSystem/...
Team Working feature makes develop-team works more orderly, efficiently, and cost savely, the quality of software document will be increased. MagicTopic feature enables you extending MagicHelp to other fields, such as project management, requirement management and transaction assistance. One can develop different kinds of extensions to extend application of MagicHelp, e.g. database tables design. -
Problem in converting XML to XML file
Hi,
I am trying to convert xml file to another xml through command-line interface but failed.
java oracle.xml.parser.v2.oraxsl data.xml data.xsl data_new.xml
My xml and xsl files are:
1. XML file
<employee_data>
<employee_row>
<employee_number>7950</employee_number>
<employee_name>ABC</employee_name>
<employee_title>PRESIDENT</employee_title>
<manager>1111</manager>
<date_of_hire>20-JAN-93</date_of_hire>
<salary>65000</salary>
<commission>1000</commission>
<department_number>10</department_number>
</employee_row>
</employee_data>
2-1 XSL file
<?xml version="1.0" ?>
<xsl:stylesheet xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates>
<xsl:sort select=".//employee_name"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
2-2 XSL file
<?xml version = "1.0"?>
<ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:for-each select="employee_data/employee_row">
<ROW>
<EMPNO><xsl:value-of select="employee_number"/></EMPNO>
<ENAME><xsl:value-of select="employee_name"/></ENAME>
<JOB><xsl:value-of select="employee_title"/></JOB>
<MGR><xsl:value-of select="manager"/></MGR>
<HIREDATE><xsl:value-of select="date_of_hire"/></HIREDATE>
<SAL><xsl:value-of select="salary"/></SAL>
<COMM><xsl:value-of select="commission"/></COMM>
<DEPTNO><xsl:value-of select="department_number"/></DEPTNO>
</ROW>
</xsl:for-each>
</ROWSET>
I used two xsl file to test but received same error message:
Error occurred while processing data.xsl: Error in expression: '*|/'.
Does anyone know how to fix the problem? I'll appreciate it very much for your help.
Thanks.
YiHi,
I have only tried it out with XML Spy, but anyway:
there seems to be an error in your 2-1 XSl file in line 2:
the correct stylesheet declaration is:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
You had an empty namespace and a wrong version attribute...
HTH,
Bernhard -
PI 7.1 can't FTP XML to XML.
hi All,
currently i was trying to configure the PI for very simple CASE like how to FTP file XML to XML follow the guide below
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00a4c567-f5f8-2b10-02af-c9e9033591ae?QuickLink=index&overridelayout=true
but nothing happen after all the configuration for the variant1, the file doesn't created on target folder, anyway how i trace the error? thanks.
Regards
HariyonoHariyono Yang wrote:
communication channel : XiPatternChannel_FileReceiver
adapter type File
target directory C:\XiPattern2
filename scheme XiPatternSenderFile1.xml
communication channel : XiPatternChannel_FileSender
adapter type File
target directory C:\XiPattern1
filename scheme XiPatternSenderFile1.xml
if you are using file adapter, with the transport protocol as FTP, then the path name of the ftp location should be generally of unix format, and the directories generally start with /
in somecases, if you are using filesytem(NFS) as transport protocol, its better to use forward slash e.g. C:/directory instead of C:\directory.
regards,
BJagdishwar. -
links.xml contains links for page1, page2
links.xml
|
+-- page1.xml
|
+-- page2.xml
I try:
<mx:Button click="loadXML2({ getField( XML(
linksItems.currentItem ), how1Link ) });" label="Link" />
Debugger says:
Error: Repeater is not executing.
at mx.core::Repeater/get currentItem()
at LinkFromXML2/___LinkButton1_click()
<!-- File: links.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<item>
<dc:title>Page 1</dc:title>
<dc:link>page1.xml</dc:link>
</item>
<item>
<dc:title>Page 2</dc:title>
<dc:link>page2.xml</dc:link>
</item>
</rdf:RDF>
<!-- File: page1.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:Work>
<dc:title>Page 1</dc:title>
</dc:Work>
</rdf:RDF>
<!-- File: page2.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:Work>
<dc:title>Page 2</dc:title>
</dc:Work>
</rdf:RDF>
<!-- File: LinkFromXML.mxml -->
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="loadXML('links.xml');">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
public var pathxml:String;
public var pathxml2:String;
private var how:Namespace = new Namespace("
http://web.resource.org/cc/");
private var dc:Namespace = new Namespace("
http://purl.org/dc/elements/1.1/");
[Bindable]
private var how1Title:QName = new QName(dc, "title");
[Bindable]
private var how1Link:QName = new QName(dc, "link");
[Bindable]
private var how2Title:QName = new QName(dc, "title");
[Bindable]
private var how1externalXML:XMLListCollection;
[Bindable]
private var how2externalXML:XMLListCollection;
private function loadXML(pathxml):void {
trace (pathxml);
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(pathxml);
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete);
private function loadXML2(pathxml2):void {
var loader2:URLLoader = new URLLoader();
var request2:URLRequest = new URLRequest(pathxml2);
loader2.load(request2);
loader2.addEventListener(Event.COMPLETE, onComplete2);
private function onComplete(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
var how1Items:QName = new QName(how, "item");
var dataXML:XML = XML( loader.data );
dataXML.addNamespace( dc );
var how1base:XMLList = dataXML.descendants( how1Items
how1externalXML = new XMLListCollection( how1base );
private function onComplete2(event:Event):void {
var loader2:URLLoader =
URLLoader(event.target);
var how2Items:QName = new QName(dc, "Work");
var dataXML:XML = XML( loader2.data );
dataXML.addNamespace( dc );
var how2base:XMLList = dataXML.descendants( how2Items
how2externalXML = new XMLListCollection( how2base );
private function getField( itemXML:XML,
field:QName):String {
return itemXML.descendants( field ).toString();
]]>
</mx:Script>
<mx:Canvas id="HowView" backgroundColor="#FFFFCC"
label="How"
width="100%" height="100%">
<mx:HBox width="100%" height="100%">
<mx:VDividedBox width="400" height="100%" id="how1Box"
backgroundColor="#B9C5A0">
<mx:Repeater width="80%" id="linksItems"
dataProvider="{ how1externalXML }">
<mx:VBox width="80%" horizontalAlign="center"
creationCompleteEffect="Fade">
<mx:LinkButton click="loadXML2('{getField( XML(
linksItems.currentItem ), how1Link )}')" label="{ getField( XML(
linksItems.currentItem ), how1Title) }" />
</mx:VBox>
</mx:Repeater>
</mx:VDividedBox>
<mx:VDividedBox width="100%" height="100%" id="how2Box"
backgroundColor="#6BA1A3">
<mx:Repeater width="100%" id="workItems"
dataProvider="{ how2externalXML }">
<mx:VBox width="534" horizontalAlign="center"
creationCompleteEffect="Fade">
<mx:Label text="{ getField( XML(
workItems.currentItem ), how2Title) }" color="#000000"/>
</mx:VBox>
</mx:Repeater>
</mx:VDividedBox>
</mx:HBox>
</mx:Canvas>
</mx:Application>"Cole_62" <[email protected]> wrote in
message
news:gd2q5r$f08$[email protected]..
> no i dont think this will work because i need to iterate
through each
> <item> in
> the XML...below is an exmaple of possible tree structure
of the XML:
> channel
> -->item1
> ----->title
> ----->imgs
> --------->imgUrl
> --------->imgUrl
> -->item2
> ----->title
> ----->imgs
> ---------->imgUrl
> -->item3
> ------>title
> ------>imgs
> ----------->(no imgs)
>
> i thought to handle this using something like the
ATTACHED CODE below:
>
> ...i need to be able to go through each <item> and
<imgUrl> (because i
> dont
> know how many (if any) there are!) sorry if my PHP
background shines
> through!
>
> THANKS!
>
> <mx:Repeater id="feed"
dataProvider="{XML.channel.item}">
> <mx:HBox>
> <mx:Text text="{feed.currentItem.title}"/>
> <mx:Repeater id="item"
dataProvider="{feed.currentItem.imgs}">
> <!-- PSEUDO CODE I NEED HELP RESOLVING:
> if ("{item.currentItem.imgURL}")
> -->
> <mx:Image source="{item.currentItem.imgUrl}"/>
> </mx:Repeater>
> </mx:HBox>
> </mx:Repeater>
How bout
<mx:Repeater id="feed"
dataProvider="{XML.channel.item}">
<mx:HBox>
<mx:Text text="{feed.currentItem.title}"/>
<mx:Repeater id="item"
dataProvider="{feed.currentItem.imgs}">
<mx:Image
source="{item.currentItem.imgURL.length()>0?item.currentItem.imgURL:null}"
includeInLayout="{item.currentItem.imgURL.length()>0}"/>
</mx:Repeater>
</mx:HBox>
</mx:Repeater> -
Writind Data to XML in XML Format
Hi,
This is my First post in Sun Forums.
I m learning XML writing in Java.
I have searched on the Net but unable to find the proper XML writing Method using any API.
Please provide code for writing the XML in correct format with useful API.?
i m giving the Scenario of XML here:-
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Description>Description Addes</Description>
<Details>Details Added</Details>
</Data>
I want to Write this Data Using the Java using any API.
Also I want to append the Data while i m executing the XML for second time.
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Description>Description Addes</Description>
<Details>Details Added</Details>
</Data>
<Data>
<NewDescription>NewDescription Addes</NewDescription>
<NewDetails>NewDetails Added</NewDetails>
</Data>
I have also made 1 application using dom4j which write data to XML file but while i m appending the Data
for the Second time in the XML the same line repeatd <?xml version="1.0" encoding="UTF-8"?> in the XML.
So please guide me how to remove or delete this line while i m going for writing the XML again or Appending the Data Again..
Please provide some code or good Links or Solution for my Problem for writing the Simple XML format file and Appending the Data to the Same XML without including the <?xml version="1.0" encoding="UTF-8"?> this line
Again ?
?.Hi,
I have Attached my Whole code in which the Same Line <?xml version="1.0" encoding="UTF-8"?> is appended while i m running this code second ,third ,fourth....n..times...
import java.util.logging.Level;
import java.util.logging.Logger;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.XMLWriter;
import org.dom4j.io.OutputFormat;
import java.io.*;
public class XMLWriting {
FileWriter out;
int i=1;
OutputFormat outformat;
XMLWriter writer;
public XMLWriting() {
public static void main(String s[]) {
System.out.println("In the Main Method::");
XMLWriting onj = new XMLWriting();
onj.createDocument();
System.out.println("In the Main Method::111111111111");
public void createDocument() {
try {
System.out.println("In the Main Method::22222222222");
out = new FileWriter("D:/foo3",true);
} catch (IOException ex) {
//Logger.getLogger(XMLWriting.class.getName()).log(Level.SEVERE, null, ex);
System.out.println("Exception Is in the CreateDocument Is::"+ex.getMessage());
Document document =DocumentHelper.createDocument();
Element root = document.addElement("root");
String Data="Data";
//Element testNode = root.addElement("Description");
Element author1 = root.addElement("Description").addText(Data);
Element author2 = root.addElement("Data").addText(" nimesh");
Element author3 = root.addElement("XMl").addText("Jignesh");
try {
//OutputFormat outformat =OutputFormat.createCompactFormat();
outformat = OutputFormat.createPrettyPrint();
writer= new XMLWriter(out,outformat);
writer.write(document);
writer.close();
} catch (Exception e) {
System.out.println("Exception Is ::"+e.getMessage());
e.printStackTrace();
OutPut after Executing Two Time:-
<?xml version="1.0" encoding="UTF-8"?>//same line appended twice
<root>
<Description>Data</Description>
<Data>nimesh</Data>
<XMl>Jignesh</XMl>
</root>
<?xml version="1.0" encoding="UTF-8"?>//same line appended twice
<root>
<NewDescription>NewData</NewDescription>
<NewData>Newnimesh</NewData>
<NewXMl>NewJignesh</NewXMl>
</root>
Please help me out in this ....If any modification is needed then correct my mistake and reply me with modified code ...I want this type of OutPut without Appending the <?xml version="1.0" encoding="UTF-8"?> this line in the XML file....
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Description>Data</Description>
<Data>nimesh</Data>
<XMl>Jignesh</XMl>
</root>
<root>
<NewDescription>NewData</NewDescription>
<NewData>Newnimesh</NewData>
<NewXMl>NewJignesh</NewXMl>
</root> -
Weblogic 10 jaas and login.jsp and web.xml/weblogic.xml security constaints
Hello,
I struggled through and got the examples.security.jaas.SampleCallbackHandler.java and examples.common.utils.ExampleUtils.java/ExampleConstants.java into eclipse where they compile. A bean I made can call SambleCallbackHandler like such:
mybean.logmein(username,password,url). I can then do a mybean.getStatus() or even a mybean.returnCode(). It does seem to correctly identlify that it is authenticating me (I see in stdout logs that it shows success or failures. The problem I have is I do not know how to apply this weblogic and web.xml/weblogic.xml so that if authentication works it redirects me to the page requiring the authentication. In web.xml I have the following set up:
<security-role>
<role-name>Admins</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>default</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/badlogin.html</form-error-page>
</form-login-config>
</login-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>empower</web-resource-name>
<description>These pages are only accessible by authorized users.</description>
<url-pattern>/admin/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>These are the roles who have access</description>
<role-name>Administrators</role-name>
</auth-constraint>
<user-data-constraint>
<description>This is how the user data must be transmitted</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
My weblogic.xml has:
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<wls:security-role-assignment>
<wls:role-name>Admins</wls:role-name>
<wls:principal-name>Administrators</wls:principal-name>
<wls:principal-name>dashap</wls:principal-name>
</wls:security-role-assignment>
</wls:weblogic-web-app>
With this set up, if I try to go to a page in /admin folder in my application, it correctly pops up the login page. The jaas in the bean is doing a loginContext.login(), which I thought does authentication too, but it never goes back to the /admin page I was going to that needed the authentication. With jaas, can I not use the web.xml FORM security option? Do I Need to use j_security in the login.jsp's form's action= option and j_username and j_password for the input type names? How do I use j_username/j_password things if I am using jaas? I could just ignore using the web.xml security stuff and put something in the pages that need authentication, but it would be easier if I could use jaas with the security featurs without doing all that. Note that my code above is using a realm called default just because that was what was in the example I got from the web. Does that need to be something else?Hi John,
I would like magic of course. However, in this case I want something special: my authentication provider uses special means and contents of headers, cookies and service from external identity management systems to determine the user's identity.
I do not want the application to present the login dialog! I want to derive the identity and the fact that the user is logged in from whatever the authentication provider returns in terms of Subject.
Ideally, the flow is something like:
- user accesses an unprotected resource - resource is shown, no interaction with authentication provider
- user presses a link or button that takes him/her to a protected resource
- the authentication provider is contacted to work with the identity asserter to establish the identity of the current user and create a subject object for this user
- the application can access the subject and principals
- ADF Security recognizes the identity and the roles (based on the principals) and coordinates access based on this.
the authentication method is client certificate. presumably this prompts WebLogic/OPS to use an identity asserter to work with custom headers and cookies ("... when you configure a web application to use CLIENT-CERT authentication. In this case, WebLogic can perform identity assertion based on values from request headers and cookies. If the header name or cookie name matches the active token type for the provider, the value is passed to the provider."). No login form should be presented to the user, as all information required to perform the authentication is already available.
I am trying to understand what I must do to have the ADF application adopt the subject set by the authentication provider - if anything?!
If you more ideas to share - I would love to hear them.
best regards,
Lucas -
Javac: invalid flag: C:\XML\web.xml
Hi,
I created a file web.xml in JCreator. When I tried to compile the file, it showed:
javac: invalid flag: C:\XML\web.xml.
Does any know how to solve the problem?
Thanks in advance.
DanThe following is the full message showed after the compiling. It also happened to *.jsp files.
--------------------Configuration: <Default>--------------------
javac: invalid flag: C:\XML\web.xml
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
Process completed. -
Extract Embedded XML within XML using XSLT
Hi,
We have a unique scenario where our incoming payload is coming from Oracle Database table which has one column of CLOB type storing complete raw XML.
We need to extract this embedded raw XML and process it further, each XML has a unique XSD associated and we have that details in a separate column.
So our DBAdapter incoming payload looks like below
<rows>
<row>
<xml_xsd>xyz.xsd</xml_xsd>
<xml>RAW XML DATA</xml>
</row>
<row>
<xml_xsd>xyzv2.xsd</xml_xsd>
<xml>RAW XML DATA</xml>
</row>
<row>
<xml_xsd>xyzv2.xsd</xml_xsd>
<xml>RAW XML DATA</xml>
</row>
<row>
<xml_xsd>xyzv3.xsd</xml_xsd>
<xml>RAW XML DATA</xml>
</row>
</rows>
How can we leverage XSL Transformation to extract this embedded XML in each row? I need the each individual XML available for further mapping. I can split the payload using XPATH filtering per XSD, but not able to find a solution to parse the embedded XML and assign to a target schema?
Research done so far points to do two transformations to get resulting XML or using Saxon Parser if available and use the parse() extension.
Any other ideas/suggestions will be helpful. Challenge here is performance as i need to do this in bulk, will have many rows to process
Thanks in advance.Hi,
You dont have finite set of XSD's and probably you wont be creating a variable for each type of xsd from that finite set.
Secondly, xslt doesnt support dynamic xpath as per my knowledge.
Question:
Do you really need XSD to do the validation?
A possible solution to your question would be using java approach as below: Pass the xml and the xpath query
public String evalXpath(String xml, String xpathQuery) {
String xpathResult ;
DocumentBuilderFactory domFactory =
DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = domFactory.newDocumentBuilder();
InputSource is = new InputSource(new StringReader(xml));
Document dDoc = builder.parse(is);
XPath xPath = XPathFactory.newInstance().newXPath();
Object result =
(NodeList)xPath.evaluate(xpathQuery, dDoc, XPathConstants.NODESET);
NodeList nodes = (NodeList)result;
for (int i = 0; i < nodes.getLength(); i++) {
xpathResult = nodes.item(i).getNodeValue();
System.out.println(xpathResult);
} catch (Exception e) {
e.printStackTrace();
return xpathResult;
Thanks,
Rosh -
Hide name space of generated xml from xml bean
Hi,
how can i hide the namespace of the generated xml from xml bean, cause im having problems with jaxb parses.The targetNamespace is for webservice and not for the user defined classes.
Sorry for the confusion
Ajay
"Ajay" <[email protected]> wrote in message
news:[email protected]..
There is a targetNamespace attribute in the autotyp ant task. But there
was a bug in 8.1. Contact the support for a patch.
The following mail explains that
This looks like a bug. There is an undocument, not officially
supported workaround: add the following java doc
to yours source code -
* @wlws:webservice targetNamespace="http://foo.bar"
public class MyService {
Details here:
http://www.manojc.com/tutorial/sample3/source2wsdd.html
Regards,
-manoj
http://manojc.com
"Mark Fine" <[email protected]> wrote in message
news:[email protected]..
The attribute targetNamespace (of the autotype task) doesn't seem to putany
information into the types file and later my deployment descriptor (viathe
source2wsdd task) contains an invalid targetNamespace attribute with a
http://tempuri.org:
eg.
<web-services>
<web-service name="IndexService"
targetNamespace="http://tempuri.org/"
uri="/IndexWebService">
I don't think this causes any problems but there should be a way tospecify
the namespace.
Has anyone else seen this is WLS8.1?
"Siva" <[email protected]> wrote in message
news:[email protected]..
By default the autotype or the servicegen ant task seem to be creating anamespace
from the java package name (like java:com.ventaso.external.common) for
xml
mapping
of user defined java classes. Is there a way to change this to name
space
I want
? Specifying the targetnamespace doesn't seem to help.
Thanks,
Siva -
URGENT: Tomcat, Connection Pool - Issue with web.xml & server.xml
Folks,
I am trying to connect to a MS SQL database using Tomcat/JSP but having issues. The code that I am using is as follows:
Context ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/test");
Connection conn = ds.getConnection();
Statement stmt = conn.createStatement();
I have added the following code to my Server.xml:
<Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="DB_AW_DATA" password="tester" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://192.168.0.1\\Newcastle"/>
And the complete web.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app (View Source for full doctype...)>
- <web-app>
- <resource-ref>
<description>Resource reference to java.sql.Connection factory defined in server.xml</description>
<res-ref-name>jdbc/test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
The error message that I am getting is as follows:
java.sql.SQLException: Cannot load JDBC driver class 'null'
What confuses me is that I have placed the following files in Tomcat\common\lib...
mssqlserver.jar
msbase.jar
msutil.jar
I think this is purely an issue with how I configured server.xml and web.xml
In the Tomcat documentation it states to put the code in the server.xml - but nested inside the Context element. This is something that I have not done as I am clear what the Context should be..
Can someone assist...
<Context path="" docBase="ROOT" debug="0"> ???
what should be the path and the docBase.
I have deployed the following application:
http://localhost:8080/SCWAPP/index.jsp
THANKS IN ADVANCE FOR ALL SUPPORRTyou should put the code you typed in server.xml into context.xml
in the META-INF folder and this will fix your problem.
the latest tomcat docs detail what to do. -
IView point to public/xml /filename.xml- urgent
Hi ,
I have a xml file (which as got some link in it) in the xml folder in the public folder. I want to make th iView point to this file (xml/filename.xml). How so i do that?
Do i have to modify something or set some property in the default.properties ?
Can anyone explain me the procedure of doing this( making the links coming from xml file in the iview).
Do i have to deploy the par file with this new modification again?
please reply soon....
Thank you ,
AvinashMost likely you haven't declared the prefix namespace for your xpath. Try to use ./*:automobileLiabilityPolicy/*:Amount instead. It will select all the elements regardless of their namespace.
Gregory Haardt
ALSB Prg. Manager
[email protected] -
Hi,
Here is the problem.
I'm using the sax parser.
I have exchanges between to servlets. Exchanges are made with xml structures.
Now, I want to insert, into a main xml description, a field that will contain a xml content and be able to get it in this form.
here is an example.
<xml>
<firstName>John</firstName>
<lastname>Doe</lastName>
<otherInfos>
<address>
<street></street>
<phone></phone>
</address>
</otherinfos>
</xml>
because I already have a parser for the bloc <address> and this bloc coulb be very large, I'd like to get it as a String
<address>
<street></street>
<phone></phone>
</address>
without having to re-write a part of parser.
Have any idea ? is it possible using org.apache.xerces.parsers.SAXParser to descibe a part of xml as a unique element ?Feature.xml - "Defines a Feature and specifies the location of assemblies, files, dependencies,
or properties that support the Feature."
Manifest.xml -"Manifest.xml file is used during the deployment of a .wsp solution package.
It tells SharePoint what files to copy, what features to install, where to put your binaries, adds SafeControl entries, as well as set code access security."
Elements.xml -"This is a definition file for the module."
Onet.xml - Depending
on where an Onet.xml file is located and whether it is part of a site definition or a web template, the markup in the file does some or all of the following:
Specifies the web-scoped and site collection-scoped Features that are built-in to websites that are created from the site definition or web template.
Specifies the list types, pages, files, and Web Parts that are built-in to websites that are created from the site definition or web template.
Defines the top and side navigation areas that appear on the home page and in list views for a site definition.
Specifies the list definitions that are used in each site definition and whether they are available for creating lists in the user interface (UI).
Specifies document templates that are available in the site definition for creating document library lists in the UI, and specifies the files that are used in the document templates.
Defines the base list types from which default SharePoint Foundation lists are derived. (Only the global Onet.xml file serves this function. You cannot define new base list types.)
Specifies SharePoint Foundation components.
Defines the footer section used in server email.
http://msdn.microsoft.com/en-us/library/ms474369(v=office.14).aspx
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
Maybe you are looking for
-
App store update shows I can't update an app since my Apple ID is not associated with my account on Yosemite. How can I just force it to allow me to RE-BUY the app again since I don't even have it to update, but I want it? Currently, I even though I
-
How to implement more than one AP in a LAN
Hi If I take two basic LinkSys access points, and want to set it up in my LAN, what extra configuration do I have to do than configuring only one AP in my LAN? I'm talking about minimum configuration. So, if I take only one LinkSys AP, I would config
-
Sync problems with Logic ????
I use adat hd24's with my logic setup with a BRC and motu midi express. I'm running smpte to my midi express from the BRC and Logic reads time code from the midi express.. I have music tracks in Logic and I'm recording vocals on the BRC. Should I run
-
My HP was stuck on the blue screen when i started it. I put in the windows 7 disk and now it works. was it a virus that caused it to be frozen on the blue screen?
-
Anyone Buy the New 8 Core Machine? and Why Over Previous 8 Core ?
i know right now it's probably best to get a older 8 core, but what will it be that logic implements in their software that would make it worth spending the extra money for a new 8 core? 64 bit ? multi threading? and what specifically will the new ma