Determine System Entities in a XML File

Hello,
i have some xml Files with the following content:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="style/webstyle.xsl"?>
<!DOCTYPE contentobject PUBLIC "-//Test//DTD Content v1.1 20021018//EN"
"dtd/content.dtd" [
<!ENTITY test1 SYSTEM "images/photo.gif">
<!ENTITY test2 SYSTEM "texts/hello.doc">
]>
<content>
</content>
Now I want to determine which Entities in the dtd are integrated.
The result should be:
test1, SYSTEM, "images/photo.gif">
test2, SYSTEM, "texts/hello.doc">.
I write the following code (JDK 1.4 Parser):
public static void getDocumentEntities(File xmlFile)
Document document = null;
try
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setExpandEntityReferences(false);
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(xmlFile);
DocumentType dtd = document.getDoctype();
if (dtd != null)
NamedNodeMap ent = dtd.getEntities(); // ????
for (int i = 0; i < ent.getLength(); i++)
Node node = ent.item(i);
System.out.print("Ent: " + node.getNodeName());
// System.out.print("NotationName: " + node.getn);
System.out.print(" PublicId: " + node.getNodeName());
System.out.println(" SystemID: " + node.getNodeName());
catch (Exception ex)
ex.printStackTrace();
The result is dissatisfactory.
First I get hundreds of Entities (probably from the dtd) and not only the two above.
Second I can`t get the path of the files for example "images/photo.gif"> .
Have anyone code for this problem? Should I use the DOM or SAX Parser for this?
I would be very happy, can anybody help me with this problem.
Much greetings, Theodore

Too difficult???
Please helped me.
Thank you, Theo

Similar Messages

  • Regarding receiver determination problem in IDOC-XI-XML file scenario

    Dear All ,
    In IDOC-XI-xml file scenario , I have configured SLD , IR . But in ID , after file adapter , reciever agreement configuration when I am doing receiver determination configuration I am not able to insert mapping program in configuration overview of receiver determination as I am not getting "New Specific" option in mapping .
    Can anybody suggest what could be the reason behind this .
    Thanks in Advance
    Prabhat

    Hi PRabhat,
    In RCVR determination, you need to select the party & service (as appropriate) save the obeject
    then refresh the configuration overview of recr det.
    then you can see the partner/service
    then you can open it & add the necessary objects.
    Regards
    Vishnu

  • 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

  • Xml file

    Hi All,
    my requirement is to download the xml from the application server (specific directory) and create sales order and after creation i have to upload the sales order data with some other information in the same place in xml format. this process should done automatically..
    now how the system knows when the xml file is kept in the application server directory.
    is there any method, function module or some thing to identify the file imd after it has been kept in that directory ?
    can any one give me some idea on this process...
    thanks

    Hi,
    1. I don't think there is any direct way (eg. event etc)
       provided by sap, so that we can know if some file
       has been put on the application server.
    2. That file will be put on server (by some other server)
        using ftp, at the OS level, so SAP will not come
       to know that a file has been put.
    3. So, in such case, our program has to run in background,
       scanning if there is some new file (based upon some naming convention and time etc). If file is found, then it can process the data.
    regards,
    amit m.

  • "Error retrieving xml file from database"

    Hello All,
    I have installed and configured planning with Shared services. While I try to create an instance in Configuration Utility by entering the Instance Name, Host Name, Port (8300) and Click "Next", I get this error -
    *"System failure:Error retrieving xml file from database".*
    My RDBMS is - SQL Server 2005
    OS - Windows 2003 Server
    I am unable to work on planning for few months due to this error.. I would sincerely appreciate if someone can provide me a solution for this..
    Thanks much,
    Varma.

    Hi,
    Ive seen this before.
    If this is a new environment could you create a blank database and configure it as your System database? Then try again and you should be fine.
    I think you may have some invalid entries in your sys database.
    Seb
    www.taysols.com.au

  • Error  while import XML file from Production to Dev., But has GREEN status

    Hi,
    I tried to export/import bex queries through XML transportation. Transportation is being done from Production system to Development. In transport connection I selected required query and then I exported to Development. export of file is done successfully.
    Now in development system I imported that XML file. It is imported. Giving GREEN symbol and also with GREEN check. But in Log view I found ERRORS. in errors it is mentioned "SAP object 46N3K1OCT22PSBN46O95MQLTJ () cannot be imported". along with long message text "Install the specified objects from Business Content. Only import the metadata afterwards.".
    What should I do now as of next step... import of file is stuck..
    How can I search object 46N3K1OCT22PSBN46O95MQLTJ (), if I have to install from BC.
    I am also unable to find the query in Development Bex analyser.
    Thanks for help....
    [email protected]

    Hi Babloo,
    According to the error message, the package may have failed are as follows:
    The user account that is used to run the package under SQL Server Agent in PRODUCTION server differs from the original package author.
    The user account does not have the required permissions to make connections or to access resources outside the SSIS package.
    The package may not run in the following scenarios:
    The current user cannot decrypt secrets from the package. This scenario can occur if the current account or the execution account differs from the original package author, and the package's ProtectionLevel property setting does not let the current user
    decrypt secrets in the package. In this scenario, we can change the SSIS Package ProtectionLevel property to EncryptSensitiveWithPassword, then modify the SQL Server Agent job step command line to include this password.
    File access fails because the current user does not have the required permissions to write to the file share that the connection manager accesses. In this scenario, we can create a SQL Server Agent proxy account. This proxy account must use a credential
    that lets SQL Server Agent run the job as the account that created the package or as an account that has the required permissions.
    References:
    SSIS package does not run when called from a SQL Server Agent job step
    Run an SSIS Package Under a Different Account
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to update xml file

    hai ....this is anitha.
    iam having some problem regarding the updation of the xml file. i can update the Node Values, its Attributes, its Childnodes etc.. successfully, but only once. first time it is working fine. but when again iam trying to update other nodes, the previously updated values r lost.. iam sending the code also.
    pls give the reply asp.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.DOMException;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.FileInputStream;
    import javax.servlet.http.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    //import javax.servlet.http.HttpSession;
    public class empXml
         String xmlFilePath="";
         File xmlFile=null;
         FileWriter fout=null;
         Element emp;
         Element empName;
         Element empDesig;
         Element empDiv;
         //Element newNode;
    public void createXml(ArrayList arr)throws IOException, DOMException
         try
              for(Iterator itr=arr.iterator();itr.hasNext();)
              System.out.println(itr.next());
              //System.out.println((String)(itr.next()));
              xmlFile=new File("D:\\Tomcat 4.0\\webapps\\news\\jsp\\employee.xml");
              System.out.println(" Employees Information ");
                        fout = new FileWriter(xmlFile);     
                        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                        DocumentBuilder docBuilder = dbf.newDocumentBuilder();
                        Document doc = docBuilder.getDOMImplementation().
                        createDocument("", "employee", null);
                        Element root = doc.getDocumentElement();
                        emp = doc.createElement("emp");
                        empName = doc.createElement("empname");
                             empName.appendChild(doc.createTextNode(arr.get(0).toString()));
                             emp.appendChild(empName);
                        empDesig = doc.createElement("empdesig");
                             empDesig.appendChild(doc.createTextNode(arr.get(1).toString()));
                             emp.appendChild(empDesig);
                        empDiv = doc.createElement("empdiv");
                             empDiv.appendChild(doc.createTextNode(arr.get(2).toString()));
                             emp.appendChild(empDiv);
                        root.appendChild(emp);           
              DomTreeBuilder.printDomTree(doc,fout); // Builds The Dom Tree
              System.out.println("Employees XML File is Successfully Generated");
         }catch (Exception e)
         System.err.println("Error while Generating file"+ e.getMessage());
         finally
         fout.close();
    }//end of createXml
    }//end of class createNewsXml
    class DomTreeBuilder
    public static void printDomTree(Node node,FileWriter fout) throws IOException
              int type = node.getNodeType();
              switch (type)
              // print the document element
              case Node.DOCUMENT_NODE:
                   fout.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
                   printDomTree(((Document)node).getDocumentElement(),fout);
                   break;
              // print element and any attributes
              case Node.ELEMENT_NODE:
                   fout.write("<");
                   fout.write(node.getNodeName());
                   if (node.hasAttributes())
                        NamedNodeMap attrs = node.getAttributes();
                        for (int i = 0; i < attrs.getLength(); i++)
                        printDomTree(attrs.item(i),fout);
                   fout.write(">");
              if (node.hasChildNodes())
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                        printDomTree(children.item(i),fout);
              break;
              // Print attribute nodes
              case Node.ATTRIBUTE_NODE:
                   fout.write(" " + node.getNodeName() + "=\"");
                   fout.write(node.getNodeValue());
                   if (node.hasChildNodes())
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                        printDomTree(children.item(i),fout);
                   fout.write("\"");
              break;
              // handle entity reference nodes
              case Node.ENTITY_REFERENCE_NODE:
                   fout.write("&");
                   fout.write(node.getNodeName());
                   fout.write(";");
                   break;
              // print cdata sections
              case Node.CDATA_SECTION_NODE:
                   fout.write("<![CDATA[");
                   fout.write(node.getNodeValue());
                   fout.write("]]>");
                   break;
              // print text
              case Node.TEXT_NODE:
                   fout.write(node.getNodeValue());
                   break;
              // print comment
              case Node.COMMENT_NODE:
                   fout.write("<!--");
                   fout.write(node.getNodeValue());
                   fout.write("-->");
                   break;
              // print processing instruction
              case Node.PROCESSING_INSTRUCTION_NODE:
                   fout.write("<?");
                   fout.write(node.getNodeName());
                   String data = node.getNodeValue();
                   fout.write(" ");
                   fout.write(data);
                   fout.write("?>");
                   break;
         } // end of Switch
         if (type == Node.ELEMENT_NODE)
                   fout.write("</");
                   fout.write(node.getNodeName());
                   fout.write('>');
    } // printDomTree(Node)
    } // End of DomBuilder Class
    waiting for the reply soon.
    thanks and regards,
    anitha

    Hi,
    There was no problem in this code. When I executed it worked well, anyway I changed slightly because to add more than one elements. I posted the entire code here:
    Regards
    Baskar
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.DOMException;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    public class empXml {
         String xmlFilePath = "";
         File xmlFile = null;
         FileWriter fout = null;
         Element emp;
         Element empName;
         Element empDesig;
         Element empDiv;
         // Element newNode;
         public static void main(String[] args) {
              try {
                   empXml x = new empXml();
                   ArrayList ar = new ArrayList();
                   ar.add("baskar,SE,Hitachi");
                   ar.add("krish,SE,Hitachi");
                   ar.add("preet,SE,Hitachi");
                   ar.add("Jan,SE,Hitachi");
                   ar.add("Sam,SE,Hitachi");
                   x.createXml(ar);
              } catch (Exception e) {
                   e.printStackTrace();
         public void createXml(ArrayList arr) throws IOException, DOMException {
              String empl[] = new String[arr.size()];
              arr.toArray(empl);
              try {
                   Iterator itr = arr.iterator();
                   xmlFile = new File("employee.xml");
                   System.out.println(" Employees Information ");
                   fout = new FileWriter(xmlFile);
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = dbf.newDocumentBuilder();
                   Document doc = docBuilder.getDOMImplementation().createDocument("",
                             "employee", null);
                   Element root = doc.getDocumentElement();
                   for (int i = 0; i < empl.length; i++) {
                        StringTokenizer st = new StringTokenizer(empl, ",");
                        emp = doc.createElement("emp");
                        empName = doc.createElement("empname");
                        empName.appendChild(doc.createTextNode(st.nextToken()));
                        emp.appendChild(empName);
                        empDesig = doc.createElement("empdesig");
                        empDesig.appendChild(doc.createTextNode(st.nextToken()));
                        emp.appendChild(empDesig);
                        empDiv = doc.createElement("empdiv");
                        empDiv.appendChild(doc.createTextNode(st.nextToken()));
                        emp.appendChild(empDiv);
                        root.appendChild(emp);
                   DomTreeBuilder.printDomTree(doc, fout); // Builds The Dom Tree
                   System.out.println("Employees XML File is Successfully Generated");
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   fout.close();
         }// end of createXml
    }// end of class createNewsXml
    class DomTreeBuilder {
         public static void printDomTree(Node node, FileWriter fout)
                   throws IOException {
              int type = node.getNodeType();
              switch (type) {
              // print the document element
              case Node.DOCUMENT_NODE: {
                   fout.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
                   printDomTree(((Document) node).getDocumentElement(), fout);
                   break;
              // print element and any attributes
              case Node.ELEMENT_NODE: {
                   fout.write("<");
                   fout.write(node.getNodeName());
                   if (node.hasAttributes()) {
                        NamedNodeMap attrs = node.getAttributes();
                        for (int i = 0; i < attrs.getLength(); i++)
                             printDomTree(attrs.item(i), fout);
                   fout.write(">");
                   if (node.hasChildNodes()) {
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                             printDomTree(children.item(i), fout);
                   break;
              // Print attribute nodes
              case Node.ATTRIBUTE_NODE: {
                   fout.write(" " + node.getNodeName() + "=\"");
                   fout.write(node.getNodeValue());
                   if (node.hasChildNodes()) {
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                             printDomTree(children.item(i), fout);
                   fout.write("\"");
                   break;
              // handle entity reference nodes
              case Node.ENTITY_REFERENCE_NODE: {
                   fout.write("&");
                   fout.write(node.getNodeName());
                   fout.write(";");
                   break;
              // print cdata sections
              case Node.CDATA_SECTION_NODE: {
                   fout.write("<![CDATA[");
                   fout.write(node.getNodeValue());
                   fout.write("]]>");
                   break;
              // print text
              case Node.TEXT_NODE: {
                   fout.write(node.getNodeValue());
                   break;
              // print comment
              case Node.COMMENT_NODE: {
                   fout.write("<!--");
                   fout.write(node.getNodeValue());
                   fout.write("-->");
                   break;
              // print processing instruction
              case Node.PROCESSING_INSTRUCTION_NODE: {
                   fout.write("<?");
                   fout.write(node.getNodeName());
                   String data = node.getNodeValue();
                        fout.write(" ");
                        fout.write(data);
                   fout.write("?>");
                   break;
              } // end of Switch
              if (type == Node.ELEMENT_NODE) {
                   fout.write("</");
                   fout.write(node.getNodeName());
                   fout.write('>');
         } // printDomTree(Node)
    } // End of DomBuilder Class

  • Special characters issue in output XML - file adapter  - SOA 10.1.3.4

    Hi,
    I use a DB adapter and File adapter to retreive data from database and create output XML file.
    For the database record which have special characters (for example ' , <, >), it will just output the same character in XML file, which cause other system to reject this XML file because of those characters.
    Anyone have this issue ? How can i resolve that ?
    Thanks

    Try converting the characters to &lt; and &gt;. This should work. Make sure the stand-alone & character is converted to & amp; (written with space as HTML will convert it back to &).
    -AR

  • How to compare after parsing xml file

    Hi,
    following code, parse the input.xml file, counts how many nodes are there and writes the node name and its value on screen.
    1) i am having trouble writing only node name into another file instead of writing to screen.
    2) after parsing, i like to compare each node name with another .xsd file for existence.
    Please keep in mind that, input.xml is based on some other .xsd and after parsing i have comparing its tag with another .xsd
    Need you help guys.
    thanks
    * CompareTags.java
    import java.io.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    /** This class represents short example how to parse XML file,
    * get XML nodes values and its values.<br><br>
    * It implements method to save XML document to XML file too
    public class CompareTags {
    private final static String xmlFileName = "C:/input.xml";
         int totalelements = 0;
    /** Creates a new instance of ParseXMLFile */
    public CompareTags() {
    // parse XML file -> XML document will be build
    Document doc = parseFile(xmlFileName);
    // get root node of xml tree structure
    Node root = doc.getDocumentElement();
    // write node and its child nodes into System.out
    System.out.println("Statemend of XML document...");
    writeDocumentToOutput(root,0);
                   System.out.println("totalelements in xyz tag " + totalelements);
              System.out.println("... end of statement");
    /** Returns element value
    * @param elem element (it is XML tag)
    * @return Element value otherwise empty String
    public final static String getElementValue( Node elem ) {
    Node kid;
    if( elem != null){
    if (elem.hasChildNodes()){
    for( kid = elem.getFirstChild(); kid != null; kid = kid.getNextSibling() ){
    if( kid.getNodeType() == Node.TEXT_NODE ){
    return kid.getNodeValue();
    return "";
    private String getIndentSpaces(int indent) {
    StringBuffer buffer = new StringBuffer();
    for (int i = 0; i < indent; i++) {
    buffer.append(" ");
    return buffer.toString();
    /** Writes node and all child nodes into System.out
    * @param node XML node from from XML tree wrom which will output statement start
    * @param indent number of spaces used to indent output
    public void writeDocumentToOutput(Node node,int indent) {
    // get element name
    String nodeName = node.getNodeName();
    // get element value
    String nodeValue = getElementValue(node);
    // get attributes of element
    NamedNodeMap attributes = node.getAttributes();
    System.out.println(getIndentSpaces(indent) + "NodeName: " + nodeName + ", NodeValue: " + nodeValue);
    for (int i = 0; i < attributes.getLength(); i++) {
    Node attribute = attributes.item(i);
    System.out.println(getIndentSpaces(indent + 2) + "AttributeName: " + attribute.getNodeName() + ", attributeValue: " + attribute.getNodeValue());
    // write all child nodes recursively
    NodeList children = node.getChildNodes();
              //int totalelements = 0;
    for (int i = 0; i < children.getLength(); i++) {
    Node child = children.item(i);
                   //     System.out.println("child value.."+child);
    if (child.getNodeType() == Node.ELEMENT_NODE) {
    writeDocumentToOutput(child,indent + 2);
                             if(node.getNodeName() == "DATA"){
                             totalelements = totalelements+1;}
                        //System.out.println("totalelements in DATA tag " + totalelements);
    /** Parses XML file and returns XML document.
    * @param fileName XML file to parse
    * @return XML document or <B>null</B> if error occured
    public Document parseFile(String fileName) {
    System.out.println("Parsing XML file... " + fileName);
    DocumentBuilder docBuilder;
    Document doc = null;
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setIgnoringElementContentWhitespace(true);
    try {
    docBuilder = docBuilderFactory.newDocumentBuilder();
    catch (ParserConfigurationException e) {
    System.out.println("Wrong parser configuration: " + e.getMessage());
    return null;
    File sourceFile = new File(fileName);
    try {
    doc = docBuilder.parse(sourceFile);
    catch (SAXException e) {
    System.out.println("Wrong XML file structure: " + e.getMessage());
    return null;
    catch (IOException e) {
    System.out.println("Could not read source file: " + e.getMessage());
    System.out.println("XML file parsed");
    return doc;
    /** Starts XML parsing example
    * @param args the command line arguments
    public static void main(String[] args) {
    new CompareTags();
    }

    hi,
    check out the following links
    Check this blog to extract from XML:
    /people/kamaljeet.kharbanda/blog/2005/09/16/xi-bi-integration
    http://help.sap.com/saphelp_nw04/helpdata/en/fe/65d03b3f34d172e10000000a11402f/frameset.htm
    Check thi link for Extract from any DB:
    http://help.sap.com/saphelp_nw04s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
    regards
    harikrishna N

  • How to download the xml file with netweaver 2004s

    I am trying to find the xml file in order to link R/3 to my portal
    I installed Netweaver 2004s but I am not able to link to R/3
    I heard that I can use another xml file from another server and download it and change the config to match the new server
    JF

    Hi JF,
           Michael is right in EP5, system are defined in XML file. use the following properties you will able to create system connecting to R/3.
    choose System Administration->&#61472;System Configuration-> System Landscape.
    Create a  system of  SAP_R/3_Dedicated type system
    Select the <b>Connector</b> from the Property category dropdown
    Application Host : <R/3 Host name>
    SAP Client: <Clent no>
    SAP System ID (SID):
    Server Port: 
    SAP System Number
    System Type: SAP_R3
    Select the <b>User Management</b> from the Property category dropdown
    Logon Method - UIDPW
    User Mapping Type - Admin,user
    Select <b>System Aliases</b> in the Edit dropdown list.
    This opens the System Alias Editor, and displays the existing list of aliases created for this system. Add the system alias here.
    Select the <b>test connection</b> in the Edit dropdown list:
    test the connection
    Hope this will solve your problem.
    Thanks
    Sai

  • Building big XML file from scratch - Urgent

    Oracle 8.1.7.3 on windows NT platform
    What is the best way to generate a quiet big XML file from multiple tables ?
    I have information stored in many relational tables from which I need to generate a XML flat file either stored in a CLOB field or in a text file in a system directory. This XML file will be then used
    as an input to generate a report either in HTML using XSLT, or in a PDF file using apache-fop or in a MS Excel file using SoftArtisan ExcelWriter.
    My XML file has many levels in it structure, I mean that it is composed of one root element with 2 children, each children has a 3 children. One on these 3 children has 2 children and so on. Actually there are more or less 10 nested levels.
    To generate this XML file, I tried to use XSU for PL/SQL with the nested cursor() feature plus XSLT to transform the raw XML file to my requirements.
    But obviously there are some limitations using this method. Particularly, if the inner cursor returns an empty set I get exhausted resultset java error... A TAR confirmed that limitation.
    So I had to give up this method to use basic nested PL/SQL cursors. Each fetched row is then inserted into a table (varchar2) with a sequence number so that with a cursor like select xml_chunk from my_table order by sequence, I get the whole XML file that I save either in a flat file or in a CLOB (using append method).
    This method works fine, but it takes time and it's not flexible at all as I have to construct each XML tag. I guest this way of proceeding is not the more efficient...
    Using DOM method won't be better as I still need PL/SQL cursor to select each level of my XML structure and in addition I might for sure encounter a problem of memory.
    So what solutions would you suggest to generate this XML file. It must be quiet fast. The XML file can be up to 2Mo big. My system is actually a kind of on-the-fly reports generation. I mean that the XML file needs to be created with up-to-date data many times during the working hours !
    Quick answers or suggestions would be greatly appreciated. It's very urgent !!
    Thanks

    I looks like the best way is to using the SAX processing for your application? Do you know the DTD or XML schema of your output XML document?
    Would you send me the sample code for the method "to use XSU for PL/SQL with the nested cursor() feature plus XSLT to transform the raw XML file" to reproduce the problem?

  • Multi XML to Single XML file

    Hi all,
    I have different requirement, Please find the below and give me the best suggestion..
    I will receive the no.of files XML file from Sources [I donu2019t know how many file I receive, it may be 5 or 10 or 20], after end of the day I need to collect those files and send to target system as a sing XML file.
    Please give me the best way,
    Thanks,
    SR

    Thanks Amit,
    Your right, my first scenario is working file...
    I generated the Flat file, and append the new message, its working fine..
    But second scenario, Pick the file and generated the XML file, it give the problem.....
    Its giving below like this, i am not able to find the sloution for this,
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_I_JC xmlns:ns0="http://XXXXX">
      <JOBS />
      </ns0:MT_I_JC>
    in Moni, i am seeing the below message
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_O_JC xmlns:ns="http://XXXXX">
    - <MT_O_JC>
      <JOBTITLE>Job</JOBTITLE>
      <REQNUMBER>Job</REQNUMBER>
      <JOBCOMPANY>XXXXX</JOBCOMPANY>
      <JOBLOCATION>edision, NJ</JOBLOCATION>
      <JOBBODY>DDDDDDD</JOBBODY>
      <JOBLINK>https://ent=302&BspLanguage=EN&sap-language=EN</JOBLINK>
      </MT_O_JC>
      </ns:MT_O_JC>
    Thanks,
    SR
    Edited by: siva reddy on Oct 1, 2009 6:49 PM

  • .tmp files genrated along with XML files

    Hi all,
    Here my Interfaces are type of RFC- XI - FTP.
    these are running successfully past long time and creating XML files in the target directory of FTP aplication system. Along with XML files this time abnormally .tmp files were generated in the Target directory of FTP application system. This was occured only one time few days back.
    The generated XML files in target FTP system as usually read by Application system and processed in the sytem.
    And tmp files generated are as XI_ftp_XI_ftp_0c200300-704c.tmp
    could you all please let me know what could be the reason for happening this like generation of .tmp files abnoramally in Target FTP application system.
    Thanks in advance...
    Regards,
    Siva

    Hi, thanks for reply.
    The Write mode is "Use temporary file"
    But we have not got these .tmp files earlier and we have not mentioned any temporary file name sceme too.
    Could any body please explain will .tmp files are generated randomly?
    If i keep 'Directly' mode, will it keeps only the XML files in target directory?
    Please advise.
    Thanks,
    Siva

  • File format error for xml file

    Hi!
    We are trying to upgrade our SAP 4.6C to EHP4.
    While "configuration roadmapstep", system asks us the XML file we have
    produced via solman. When we enter the path of the file system gives theerror below:
    The selected configuration file
    ("E:\downloadupg\SMSDXML_FKQ_20100917142727.656.xml") is not useable.
    Reason: "File format error"
    We have tried the txt file instead of xml file. The result was same.
    You can find the details of our system.
    4.6D EX2 32 bit kernel
    windows 2003 64 bit OS
    sql 2005 64 bit database software
    We have to upgrade our system until that monday.
    Please help us as soon as possible.
    Best regards
    Noyan Durna

    Hello Noyan,
    first, the official information: please refer to note #1022704 - for source release 4.6, the TXT file has to be used instead of the XML file. Otherwise, 'File format error' will occur as in your case.
    But since you tried this option, you should turn your attention to the XML itself, which must contains entries that are not handled by function module OCS_GET_UPG_STACK_INFO in the 4.XX source systems. The function module only expects the entries [SPAM_CVERS], [PRDVERS] and [SWFEATURE].  Any other entries present on the file can cause an error. 
    Please check your file for other entries like [APP_SYSTEM], [SWFEATUREINC], [TECHUSAGES], [INITIAL_CVERS], [EXPORT_CVERS], and [DVD_SET]; this might be the cause of the error. 
    In order to workaround this, you can either edit the file and remove the invalid entries or recreate it (w/o this entries also).
    Best regards,
    Tomas Black

  • HR - XI - External System: one IDOC to multiple XML Files

    Hi,
    I have a scenario where I need, out of one HRMD_A07 IDOC send multiple XML files:
    The IDOC and the XML files can the Master data for many employee (IDOC has max of 200 as of SAP, external system, max of 1000).
    The IDOC will be generated with change pointers with all the needed filters (I can add/remove if needed).
    My goal is to generate 3 types of XML files:
    - 1 for the persons (containing basic info like name, firstname, persnr,etc)
    - 1 for the various unit (with basic info of unit like number, description & name)
    - 1 for the links between persons and units (this person is linked with that unit)
    The structures of the 3 XML files are know and can be imported via XSD definition.
    Do I need to use BPM for doing so or is there a way to do that with simple mapping?
    If BPM is needed, as I new to that, if you have a link to a begginer guide, fell free to send it
    Cheers,
    greg

    hi,
      For your scenario there is no need of BPM.
      In message mapping select the message tag.
      In the target add 3 message types.
      Just map the fields.Go to Interface mapping add the 3 message in the target.
      Get the mapping.
      In ID sender agreement,Receiver Determination is same.
      In Interface Determination select extended.Get the mapping.
      Create 3 Receiver agreement for each Receiver.
    Regards,
    Prakasu

Maybe you are looking for

  • I changed my email address for my Apple ID but my phone doesn't recognize my new email it keeps asking for my password for my old email

    I changed my email address for my Apple ID. When I want to use iCloud my iPhone doesn't seem to recognize my new email it keeps asking for my password for my old email. I can't update the new address it keeps defaulting to my old one.

  • IPhone 3GS with OS4 upgrade - using Apple's Bluetooth Keyboard

    Help! I just upgraded my iPhone 3GS to OS 4. I also bought an Apple Bluetooth Keyboard. It's awesome except for one thing. After I type a text message and go to send it, I push the "Send/Enter" button and it just goes to the next line, it won't actua

  • Socket

    I have an application in which java program (client)communicates with IBM mainframe (server) using socket. when server writes about 16k data as reply, sometime java program receives all 16k data. sometimes it does not receive all data. After certain

  • Types of session persistence in clustering

    does anybody know what are the types of session persistence in clustering(In-memory replication,Database persistence etc..) what is the advantages and disadvantages of each type? we r using oracle appserver 10.1.2.

  • McAfee Mobile Security

    Hello! Are there any users of Mobile Security programmes like McAfee security for example? I just want to ask which one is the best and whether McAfee is worth of paying for premium version? thanks.