How to update XML file using XSLT

Hi there,
I have a "small" issue with exporting data to an XML file using XSLT.
A two steps process is needed to import data from a non-hierarchical XML file into ABAP, change the data, and then update the XML file with new values. The problem is not trivial, since the format of the XML file is a complex one: there are many interdependent elements on the same level, pointing to each other by using id and ref attributes. Based on these values the data can be read and written into an internal table. I use XSLT and XPath for that. So the inbound process is done and seems to work correctly. I have to mention that the file contains much more data than I need. I am working only with a small part of it.
Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT? I can pass only the internal table to the transformation, so how do I access the XML file in order to update it? I have tried to use the <B>xsl:document()</B> function to access the content of the file store locally on my PC, but it fails each time by throwing and URI exception. I have tried the absolute path without any addition and the path with the file:/// addition. Same result. Please advise.
Many thanks,
Ferenc
P.S. Please provide me with links only if they are relevant for this very matter. I will not give points for irrelevant postings...

Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
XSLT approach:  check these online tutorial
http://www.xml.com/pub/a/2000/08/02/xslt/index.html
http://www.xml.com/pub/a/2000/06/07/transforming/index.html
ABAP approach:
for example you have the xml (original) in a string called say xml_out .
data: l_xml  type ref to cl_xml_document ,
        node type ref to if_ixml_node  .
create object l_xml.
call method l_xml->parse_string
  exporting
    stream = xml_out.
node = l_xml->find_node(
    name   = 'IDENTITY'
   ROOT   = ROOT
l_xml->set_attribute(
    name    = 'Name'
    value   = 'Charles'
    node    = node
(the above example reads the element IDENTITY and sets attribute name/value to the same)
like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
so how do I access the XML file in order to update it?
you have already read this XML into a ABAP variable right?
Sorry couldnt understand your whole process, why do you need to read local XML file?
Raja

Similar Messages

  • HOw to update XML file residing in DAM by component JSP in run-time?

    i have made a component which reads xml file residing in DAM.
    Content Author can fill some values in dialog of this component, as soon as author provide the values,i have to update these values in XML file and component reloadsby reading the updated xml file.
    i am trying to achieve this by making object of XML file and giving it's path., but i ma unable to access the XML file.
    Can anyone help me out to how to update XML file by component JSP in run-time?

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to access xml file using c

    how to access xml file using c. are there any libraries regarding xml fastinfoset in c? Please let me know about any resources if u know? thanks!!!
    samitha

    There are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.

  • Updating XML file using DOM parser

    Hi,
    Can someone help me, how to update following XML file using DOM parser.
    The following is my XML file.
    <students>
         <student>
              <id>1</id>
              <name>abc</name>
         </student>
         <student>
              <id>2</id>
              <name>xyz</name>
         </student>
         <student>
              <id>3</id>
              <name/>
         </student>
         <student>
              <id>4</id>
              <name>ijk</name>
         </student>
         <student>
              <id>5</id>
              <name></name>
         </student>
    </students>Consider, I will input 2 fields, ie., id & name. For the matching Id, the name has to be updated.
    Though, I have achieved this, but I am unable to update the value for 3rd record, & 5th record ie., id=3 & id=5. Since, these are blank.
    Thanks.

    Some <name> elements have a child node which is a text node. From what you say it appears you know how to change those text nodes.
    The other <name> elements don't have any child nodes. But you want one. This suggests to me that you need code that creates a text node and adds it to the <name> element as its child.

  • How to read XML file using Automatic ref No

    I need to get the data from the xml file using Automatic reference No.I am a beginner .help me out

    Hi Parthipan,
    An easy way to get started with using XML in LabVIEW is a toolkit called EasyXML -- it's a product from JKI that I helped create
    Thanks,
    -Jim

  • How to update XML file from the program

    i am new in abap , and i have the following issue,so plz anyone who knows how to do it
    Background :
    An XML file is used as the datasource for a Flex Application. From time to time this requires updating with new staff details.
    i have already saved the xml file in the c drive with the name C:\AdvAC\AC1\bin-debug\assets\staff
    Requirement :  Write a Dialog transaction with the following text input fields.
    Reference Indicator.     (Char10)
    Staff No          (NUMC, Length 5)
    Name               (Char50)
    Room               (Numc, length 3)
    Phone               (Numc Length 7)
    Mail               (char30)
    in screen 100
    The transaction should also have an u201CUpdate Fileu201D button, which when pressed :
    1) Loads the file C:\AdvAC\AC1\bin-debug\assets \ into an ITAB.
    2) Inserts the data into the ITAB using the following XML format.
    <staff>
    <ref_ind> Reference Indicator.</ref_ind>
    <staff_no> Staff No </staff_no>
    <name> Name </name>
    <room> Room </room>
    <phone> Phone </phone>
    <mail> Mail </mail>
    </staff>
    all should be inside  <allstaff> </allstaff> tagsu2026.
    Writes the ITAB back to the file.
    thanx all

    this is what i have done but i dont know how to do the rest. i will apprecite any help from u.
    Edited by: man700s on Feb 16, 2010 6:58 AM
    REPORT  Z_XML_FILE_UPDATE.
    TYPES: BEGIN OF ts_staff,
             REF_IND(10)  TYPE c,
             Staff_No(5)  TYPE c,
             Name(50)     TYPE c,
             Room(3)      Type n,
             Phone(7)     Type n,
             Mail(30)     Type c,
           END OF ts_staff.
    DATA: t_staff TYPE TABLE OF ts_staff WITH HEADER LINE.
    DATA: w_staff Type ts_staff.
    DATA T_STRING TYPE TABLE OF STRING.
    DATA W_STRING TYPE STRING.
    call SCREEN 100.
    PERFORM upload_xml_file.
    PERFORM update_xml_tab.
    *PERFORM download_xml_file.
    MODULE USER_COMMAND_0100 INPUT.
    W_STRING = '<allstaff>'.
      APPEND w_string to t_string.
      loop at t_staff into w_staff.
      w_string ='<staff>'.
      APPEND w_string to t_string.
      if T_staff-Ref_Ind = 'X'.
      CONCATENATE '<Ref_Ind>' w_staff-Ref_Ind '</Ref_Ind>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-staff_no = 'X'.
      CONCATENATE '<staff_no>' w_staff-staff_no '</staff_no>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-name = 'X'.
      CONCATENATE '<name>' w_staff-name '</name>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
    if T_staff-room = 'X'.
      CONCATENATE '<room>' w_staff-room '</room>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-phone = 'X'.
      CONCATENATE '<phone>' w_staff-phone '</phone>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-mail = 'X'.
      CONCATENATE '<mail>' w_staff-mail '</mail>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      w_string = '</staff>'.
      append w_string to t_string.
    ENDLOOP.
      W_STRING = '</allstaff>'.
      APPEND w_string to t_string.
    ENDMODULE.               
    Edited by: man700s on Feb 16, 2010 7:01 AM

  • How to update XML file through UCCX script ?

    Hi,
    I have an UCCX script with MENU step. One of the step is for technical support team. When caller chose this step, information about date and time of the call and calling number should be recorded on a XML file located on the web server.
    This XML is uploaded into the web server , but I don't know how to update it through UCCX script.
    Here is how the XML file looks like:
    <?xml version="1.0" ?>
    <rss version="2.0">
    <channel>
    <title>CALL LOG</title>
    <link></link>
    <description>Support Call log</description>
    <ttl>1</ttl>
    <item>
    <title>2011-08-24 14:56:39 - 00044 123 123 123</title>
    <link></link>
    <description></description>
    </item
    </channel>
    </rss>
    Any idea?
    Thanks,
    O

    Hi
    The 'keyword transform' step uses the template XML file to generate the actual XML file you want to post... the template would be a plain text file uploaded to the repository, and would look like so:
    <?xml version="1.0" ?>
    CALL LOG
    Support Call log
    1
    %%calldatetime%% - %%clinumber%%
    Now - if you had that bit of XML, with correct time/number in it - have you verified know that you can definately just post that XML to a certain URL to get it on the server? Check with whoever manages that server exactly what you need to do to get it to appear - then worry about how you do that from UCCX. It may not be a matter of posting up that XML, you may need it in a different format or something..
    Aaron

  • How to get XML file using servlets that XI sent to my J2EE appl?

    Hi All!
    I have a scenario like XI sends xml file to j2ee application. In my J2EE application my servlet receives this xml. Will the xml file be in my HTTPServletRequest object? if so how to get that file from Request object.
    Please help me its urgent, Any code help is highly appreciated.
    My xml file will be like this:
    <ns0:Http_Message_Type_Demo
    xmlns:ns0="http://abcdemo.com">
    <Name>ABC</Name>
    <RollNo>123</RollNo>
    <Address>a-4</Address>
    </ns0:Http_Message_Type_Demo>
    somebody should help me!please
    Thanks

    Hi,
    You can use HTTPServletRequest object to get the XML payload.
    BufferedReader reader = request.getReader(); //gets XML payload
    String line = reader.readLine(); // to read the XML payload line by line
    (request is the HTTPServletRequest object)
    Regards,
    Uma

  • Updating XML file using GUI

    Hi
    I have created a java class that uses JButton to bring up JFileChooser. I then select a file and add the file details to a xml file. below is the code showing how I capture this information and add to xml:
    if(file != null && state==JFileChooser.APPROVE_OPTION)
                             String name= file.getName();
                             String directory = file.getPath();
                             long length = file.length();
                             // convert file length into
                             long kb= length/1024;
                             String s= new String();
                             String a=s.valueOf(kb);
    UploadFiles uploadFiles = new UploadFiles();     
                        uploadedFiles.addFileElement(name,directory,a);
    addFileElement(...) is a method that add the above information to xml file. however, when I select a file, the file details are not added to the xml file; and i also get some errors.
    But I know that my addFileElement(..) method is correct since if I use the following code , I am able to write to a xml file:
    uploadedFiles.addFileElement("xml.java","directory","size");
    So does anyone know why my addFileElement(...) is not working properly.
    thanks
    Qasim

    Below is my code for addFileElement method.First of all I was using DOM, but since this method was not working properly I switched to JDOM. I wrote the same code in Jdom, and now it is working.
    public void addFileElement(String name, String directory, String size)
              this.name=name;
              this.directory=directory;
              this.size=size;
              //create a file element to hold information about a file
              Element fileElement=document.createElement("file");
              //create attributes for name
              Attr nameAtt = document.createAttribute("name");
              nameAtt.setValue(name);
              //set directory attribute
              Attr directoryAtt = document.createAttribute("directory");
              directoryAtt.setValue(directory);
              //size attribute for the file
              Attr sizeAtt = document.createAttribute(size);
              sizeAtt.setValue(size);
              //add teh above attributes to the file element
              fileElement.setAttributeNode(nameAtt);
              fileElement.setAttributeNode(directoryAtt);
              fileElement.setAttributeNode(sizeAtt);
              //decide where we want to put this element. first get the 'files' element reference and insert this new element after it.
              NodeList newfile = document.getElementsByTagName("file");
              Element firstFile=(Element)newfile.item(0);
              firstFile.getParentNode().insertBefore(fileElement, firstFile);
              try
                   ((XmlDocument) document).write(new FileOutputStream("UploadedFiles.xml"));
              catch (IOException io)
                   System.err.println("Problem with writing to file " );
                   io.printStackTrace();
         

  • How to generate XML file using select files manually option in MOPz

    Hi Guru's!
    Can someone tell me how can I generate XML file not using the calculate automatically option but using select files manually. thanks!

    Hi Maix,
    You may manually add the files into download basket and then approve it.
    Use the SCN document below for the steps.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b14f0c-b9af-2e10-ba83-f05ebcfbc3c2?QuickLink=index&…
    Hope this helps.
    Regards,
    Deepak Kori

  • 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

  • How to update pdf file using adobe exportpdf

    can you update a pdf if you only have the export pdf product?  thx

    Hi canusbau
    You Cannot Edit a PDF File Using Export PDF. You can Convert PDF into other formats using this Service,
    Though You can Convert it to Word or any Other format, Make Changes in the Document and then Use MS Office Save as Adobe PDF option to Create PDF again.

  • How to generate XML file using EJB ?

    Hi
    Cab anyone point me towards some good examples which creates xml file for the data extracted using EJBs .I have rough idea that this could be done with DOM/JDOm but need some goos example .
    Also I have J2EE RI server,Xalan/Xerces ....Do I need to download DOM/JDOM APIs separately...
    I am relatively new to J2EE .
    Thanks
    Ash

    http://www.theserverside.com/home/index.jsp
    J2EE and XML Development PDF
    Dave

  • How to reorganize xml doc using xslt?

    Hi, guys:
    I want to display verse before title for the following document:
    xml document:
    <poem>
    <title>Paradise Lost</title>
    <verse>Him thus intent <prop>Ithuriel</prop> with his spear</verse>
    </poem>
    I tried using xsl:value-of tag, but it does not change the order:
    <xsl:template match="verse">
    <fo:block font-size="10pt" font-family="Times">
    <xsl:value-of select="."/>
    </fo:block>
    </xsl:template>
    <xsl:template match="title">
    <fo:block font-size="14pt" font-family="Times">
    <xsl:value-of select="."/>
    </fo:block>
    </xsl:template>
    <xsl:template match="prop">
    <fo:inline font-style="italic">
    <xsl:apply-templates/>
    </fo:inline>
    </xsl:template>
    Any suggestions?
    thanks,

    <xsl:template match="poem">
      <xsl:apply-templates select="verse"/>
      <xsl:apply-templates select="title"/>
    </xsl:template>PC&#178;

  • How to validate XML files using several XSD?

    hi friends i need java code for this application >?
    Plz. help me urgent............

    Use the parser property
    http://apache.org/xml/properties/schema/external-schemaLocation
    to specify more than one schemas.
    http://xerces.apache.org/xerces2-j/properties.html

Maybe you are looking for