How to write xml to updated regulary PO to SO

Hi all expert,
I had write the xml B1 Scenario which PO to SO. The problem is the system only integrated when new PO add in at database A, then SO at database B created. Meanwhile user go to add in additional item in the PO. The SO cannot be updated. Any idea for the script?
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
     <xsl:output method="xml" encoding="UTF-8" indent="yes" />
     <!From SystemID>
     <xsl:param name="CustomerNumber" select="/b1im:B1IMessage/b1im:Header/b1im:System/sim:PropertyList/sim:Property[@Key='Subsidiaries Customer Number']/@Value" />
  <xsl:template match="/">
          <xsl:apply-templates select="b1im:B1IMessage/b1im:Body/b1im:Payload[starts-with(@ObjectTypeId,'B1.200') and contains(@ObjectTypeId,'_PO')]/BOM"/>
     </xsl:template>     
     <xsl:template match="b1im:B1IMessage/b1im:Body/b1im:Payload[starts-with(@ObjectTypeId,'B1.200') and contains(@ObjectTypeId,'_PO')]/BOM">
          <BOM>
               <BO>
                    <AdmInfo>
                         <Object>17</Object>
                         <Version>2</Version>
                    </AdmInfo>
                    <Documents>
                         <row>
                              <DocType>dDocument_Items</DocType>
                              <CardCode>
                                   <xsl:value-of select="$CustomerNumber" />
                              </CardCode>
                              <DocDate>
                                   <xsl:value-of select="BO/Documents/row/DocDate" />
                              </DocDate>
                              <DocDueDate>
                                   <xsl:value-of select="BO/Documents/row/DocDueDate" />
                              </DocDueDate>
                                                <Comments>
                                   <xsl:value-of select="BO/Documents/row/Comments" />
                              </Comments>
                         </row>
                    </Documents>
                    <Document_Lines>
                         <xsl:for-each select="BO/Document_Lines/row">
                              <row>
                                   <LineNum>
                                        <xsl:value-of select="LineNum" />
                                   </LineNum>
                                   <ItemCode>
                                        <xsl:value-of select="ItemCode" />
                                   </ItemCode>
                                   <Weight1>
                                        <xsl:value-of select="Weight1" />
                                   </Weight1>
                                   <Quantity>
                                        <xsl:value-of select="Quantity" />
                                   </Quantity>
                                      <Price>
                                        <xsl:value-of select="Price" />
                                   </Price>
                                                 <!--   <LineTotal>
                                        <xsl:value-of select="LineTotal" />
                                   </LineTotal> -->
                                   <U_GRField>
                                        <xsl:value-of select="U_BRField" />
                                   </U_GRField>
                                                        <U_B1_Price>
                                                                <xsl:value-of select="Price" />
                                   </U_B1_Price>
                              </row>
                         </xsl:for-each>
                    </Document_Lines>
               </BO>
          </BOM>
     </xsl:template>
     <xsl:template name="deleteLeadingZero">
          <xsl:param name="strFragment" />
          <xsl:variable name="len" select="string-length($strFragment)" />
          <xsl:choose>
               <xsl:when test="$strFragment= '0'" />
               <xsl:when test="len &lt;= 1 or substring($strFragment,1,1) != '0'">
                    <xsl:value-of select="$strFragment" />
               </xsl:when>
               <xsl:otherwise>
                    <xsl:call-template name="deleteLeadingZero">
                         <xsl:with-param name="strFragment" select="substring($strFragment, 2, $len - 1)" />
                    </xsl:call-template>
               </xsl:otherwise>
          </xsl:choose>
     </xsl:template>
</xsl:stylesheet>
Regards,
Eric Tan

Hi Eric,
Sorry for the late response. You should be used to this document [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0bf4978f-0e01-0010-2d89-c140ac1177da]. This is the example for that document. [https://www.sdn.sap.com/irj/sdn/softwaredownload?download=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/business%20one/b1_to_b1_business_integration_unit.zip]. Both should give you a good idea about what's going on, and how to configure the business units.
Regards,
Ian

Similar Messages

  • How to write XML with attributes to a table in Oracle?

    I tried to find solutions over the internet. Some of the stuff I looked at:https://forums.oracle.com/thread/2182669 http://www.club-oracle.com/forums/how-to-insert-data-from-xml-to-table-t2845/
    In all these cases, the solution considers XML structure with only nodes and child nodes but not attributes. In fact, one of the solutions suggests transforming the XML into a canonical form with only nodes w/o attributes.
    This is a sample of xml structure I am working with:
    Sample XML
    <rep type="P" title="P List"> <as> <a id="3" /> <a id="4" /> </as> </rep>
    I am working with oracle client 11.2 and SQL developer
    My question is: how to write XML data into a table with attributes also as column values, beside the nodes?

    My question is: how to write XML data into a table with attributes also as column values, beside the nodes
    The question you should be asking is : "how do I access attributes in the XPath language?"
    and the answer to that is easily found in any XPath tutorial you may find over the Internet, it is not related to Oracle in particular.
    Short answer : you use an "attribute::" axis before the attribute name, or more commonly a "@", e.g. @type, @id etc.
    Using the method described in the first link, something like this will extract the root attributes :
    SELECT x.*
    FROM XMLTable(
           '/rep'
           passing <xmltype variable/column goes here>
           columns type  varchar2(1)  path '@type'
                 , title varchar2(30) path '@title'
    ) x ;
    For deeper levels, use additional XMLTable calls as described in the mentioned post.

  • How to write XML into file using JSP

    Hello,
    I am parsing a XML file, then updating some of it content and trying to write back the updated file into the same location as an xml document but its not happening correctly....it gets written like this.
    &_lt;db_name&_gt;dataext&_lt;/db_name&_gt;
    Here is my code......somebody please advise
    <%@ page contentType="text/html"%>
    <%@ page import="java.io.*,
                        java.util.*,
                        org.jdom.*,
                        org.jdom.input.SAXBuilder,
                        org.jdom.output.*" %>
    <%
    String xml_file = "webapps/root/web-inf/admin.xml";
    SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
    Document l_doc = builder.build(new File(xml_file));
    Element root = l_doc.getRootElement();
    List admin = root.getChildren("db");
    Iterator loop = admin.iterator();
    while ( loop.hasNext()) {
         Element ele = (Element)loop.next();
         String state = ele.getChild("state").getText();
         String name = ele.getChild("db_name").getText();
         String ip = ele.getChild("db_ip").getText();
         if(state.equals("Florida")) {
              ele.getChild("db_ip").setText("209.11.111.1");
    XMLOutputter l_format = new XMLOutputter();
    String ls_result = l_format.outputString(l_doc);
    root.setText(ls_result);
    ls_result = l_format.outputString(l_doc);
    %>
    <html><head><title></title></head>
    <body>
    <%
         try {
              FileOutputStream ostream = new FileOutputStream("c:\\admin.xml");
              ObjectOutputStream p = new ObjectOutputStream(ostream);
              p.writeObject(ls_result);
              p.flush();
              ostream.close();
         catch(Exception e) {
              out.println(e.toString());
    %>
    </body>
    </html>     

    thanks amgandhi.....
    I found a solution for it, courtesy of this site:
    http://www.topxml.com/tutorials/main.asp?id=jdom&page=15
    <-********************************************************->
    import org.jdom.output.XMLOutputter;
    import org.jdom.*;
    import java.io.*;
    import java.util.*;
    // Write a program that creates document with a
    // single root element. Add a comment to the
    // root element, and assign the document's XML to
    // a local string. Finally, write the String to
    // System.out, and write the document to a text file.
    // For bonus points, allow the user to specify the
    // file name on the command line.
    public class ws3
    public static void main(String[] args)
    String filename = "default.xml";
    if(args.length > 0) filename = args[0];
    Element root = new Element("simple");
    Document doc = new Document(root);
    Comment cmt = new Comment("A bare document!");
    root.addContent(cmt);
    XMLOutputter outputter = new XMLOutputter(" ",
    true);
    String xml = outputter.outputString(doc);
    System.out.println(xml);
    writeToFile(filename, doc);
    private static void writeToFile(String fname,
    Document doc)
    try {
    FileOutputStream out =
    new FileOutputStream(fname);
    XMLOutputter serializer =
    new XMLOutputter(" ", true);
    serializer.output(doc, out);
    out.flush();
    out.close();
    catch (IOException e) {
    System.err.println(e);
    }

  • Please help; how to write XML document with JSP?

    I try to write XML document with JSP...
    But I got wrong results everytime.
    The result is not XML file displayed in the browser,
    but HTML file.
    I even tried to use HTML special code for <, >, "
    but still display as HTML file not XML file.
    How to do this?
    Thanks in advance. I put my codes below.
    Sincerely,
    Ted.
    ================
    Here is code for the JSP (called stk.jsp):
    <%@ page contentType="text/xml" %>
    <%@ page import="bean.Stock" %>
    <jsp:useBean id="portfolio" class="bean.Portfolio" />
    <% java.util.Iterator pfolio = portfolio.getPortfolio();
    Stock stock = null; %>
    <?xml version="1.0" encoding="UTF-8"?>
    <portfolio>
    <% while (pfolio.hasNext())
    stock = (Stock) pfolio.next(); %>
    <stock>
    <symbol>
    <%=stock.getSymbol() %>
    </symbol>
    <name><%=stock.getName() %> </name>
    <price><%=stock.getPrice() %> </price>
    </stock>
    <% } %>
    </portfolio>
    =================
    Here is the code for bean.Stock:
    package bean;
    public class Stock implements java.io.Serializable
    String symbol, name;
    float price;
    public Stock(String symbol, String name, float price)
    this.symbol = symbol;
    this.name = name;
    this.price = price;
    public String getSymbol()
    return symbol;
    public String getName()
    return name;
    public float getPrice()
    return price;
    ===============
    And here is bean.Portfolio:
    package bean;
    import java.util.Iterator;
    import java.util.Vector;
    public class Portfolio implements java.io.Serializable
    private Vector portfolio = new Vector();
    public Portfolio()
    portfolio.addElement(new Stock("SUNW", "Sun Microsystem", 34.5f));
    portfolio.addElement(new Stock("HWP", "Hewlett Packard", 15.15f));
    portfolio.addElement(new Stock("AMCC", "Applied Micro Circuit Corp.", 101.35f));
    public Iterator getPortfolio()
    return portfolio.iterator();
    }

    Hi
    I'm not sure whta your query is but I tested your code as it is has been pasted and it seems to work fine. There is an XML output that I'm getting.
    Keep me posted.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • How to write xml

    I'm a bit of a newbie to xml so apologies if I am going over old ground. I am trying to find the most productive way to write xml, every time I try and create an xsd from my file it keeps throwing up lots of validation errors, can anyone recommend the best way, by this i mean fastest and most time saving way to write xml using software to check my work as I type, does such a thing exist? thanks in advance for your replies.

    to answer your question, yes you can use software to make the job easier, most professional programmers would typically use something called an 'xml editor' for this kind of work, the one I use is [Liquid XML Editor|http://www.liquid-technologies.com/xml-editor.aspx] because it's cheap, you can get more expensive ones but it's all down to what you want it to do. However if you are having issues writing valid xml I would probably suggest you have a look at the [W3 website|http://www.w3.org] which covers all the standards for xml and [W3 schools |http://www.w3schools.com] which is basically an online resoure of learning materials for xml. There's a fairly good review site of xml editors here [http://www.xml-editors.info|http://www.xml-editors.info]

  • How to write xml data to a file

    Hi all,
    We have a requirement of writing the xml data into a file in given directory in the server. Generating the xml data using the sql query below.
    SELECT XMLELEMENT ("ROW",
    XMLELEMENT ("CELL", xmlattributes ('EBIZCZMDL_01' AS "colname"), inventory_item_id),
    XMLELEMENT ("CELL", xmlattributes ('EBIZFFMT_01' AS "COLNAME"), attribute29),
    XMLELEMENT ("CELL", xmlattributes ('COMMON' AS "COLNAME"),inventory_item_id || '' || attribute29 || 'ITM')
    AS "RESULT") "XMLDATA"
    FROM apps.mtl_system_items_b
    When we try to write the the data from this query to a file using UTL_FILE.put_line, the script gives the error
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    If somebody can help us pls.......
    Thanks in advance

    Hi Odie,
    We are looking at the xml data to be like the below:
    - <xref xmlns="http://xmlns.oracle.com/xref">
    - <table name="NAPP_ITEM_ITEMID">
    - <columns>
    <column name="EBIZFFMT_01" />
    <column name="COMMON" />
    <column name="EBIZQOT_01" />
    <column name="EBIZCZMDL_01" />
    <column name="EBIZCZGOLD_01" />
    </columns>
    - <rows>
    - <row>
    <cell colName="EBIZFFMT_01">154</cell>
    <cell colName="COMMON">154811809990111362727</cell>
    <cell colName="EBIZQOT_01">81</cell>
    <cell colName="EBIZCZMDL_01">91</cell>
    <cell colName="EBIZCZGOLD_01">991</cell>
    </row>
    - <row>
    <cell colName="EBIZFFMT_01">180</cell>
    <cell colName="COMMON">180811809990111362727</cell>
    <cell colName="EBIZQOT_01">871</cell>
    <cell colName="EBIZCZMDL_01">731</cell>
    <cell colName="EBIZCZGOLD_01">341</cell>
    </row>
    </rows>
    </table>
    </xref>
    We have managed half way trying to get the structure. As we are new to this XML Programming.
    The call to dbms_xslprocessor.clob2file is within the cursor loop for the given SQL.
    DECLARE
    l_file_name VARCHAR2 (30);
    l_file_path VARCHAR2 (200);
    CURSOR xml_cur
    IS
    SELECT XMLELEMENT
    ("ROW",
    XMLELEMENT ("CELL",
    xmlattributes ('EBIZCZMDL_01' AS "colname"),
    inventory_item_id
    XMLELEMENT ("CELL",
    xmlattributes ('EBIZFFMT_01' AS "COLNAME"),
    attribute29
    XMLELEMENT ("CELL",
    xmlattributes ('COMMON' AS "COLNAME"),
    inventory_item_id || '' || attribute29 || 'ITM'
    ) AS "RESULT"
    ) "XMLDATA"
    FROM apps.mtl_system_items_b
    WHERE attribute29 IS NOT NULL;
    BEGIN
    l_file_path := '/usr/tmp';
    l_file_name := 'TEST_XREF4.xml';
    FOR xml_rec IN xml_cur
    LOOP
    dbms_xslprocessor.clob2file(xml_rec.XMLDATA, l_file_path, l_file_name, nls_charset_id('UTF8') );
    END LOOP;
    END;
    Please see the above code snippet and help us if we are doing something wrong.
    Thank you

  • How to write xml doc to file in PL/SQL

    I have a function defined that uses xmlgen.getxml to generate an xml confirmation document. I am calling this function from a trigger and would like to have the returned xml document (a clob) written to an OS file. Can anyone help me with this issue?
    Thanks,
    John

    declare
    TYPE weak_cursor_type is REF CURSOR;
    curOUT weak_cursor_type;
    vOUT clob;
    begin
    open curOUT FOR SELECT xmlgen.getXML('select * from all_users',1) XML_TXT FROM DUAL;
    fetch curOUT into vOUT;
    sp_gen_util.output_clob(vOUT,80,'file');
    sp_gen_util.output_str(vOUT, 250, 'screen');
    end;
    ----part of package sp_gen_util----
    ------------- package variables --------------
    SUBTYPE max_str_type is varchar2(32767);
    wk_CR char:=chr(10);
    MAX_STR_LEN constant number:= 32767;
    --- driver routine. calls "open_file_function"
    --- and "LOBPrint"
    --- assumptions: that UTL_DIR has been set in INIT.ORA
    --- to support any directories passed
    --- inputs: CLOB for output
    --- line_length (only affects screen output just now)
    --- destination (currently allows "screen" and "file")
    --- file_status ("a" append, "w" open for write)
    --- dirname (directory path for file)
    --- filename (file name for write or append)
    PROCEDURE output_clob (
    p_str clob,
    p_line_length number DEFAULT 80,
    p_destination varchar2 DEFAULT 'screen',
    p_status varchar2 DEFAULT 'a',
    p_dirname varchar2 DEFAULT '/tmp',
    p_filename varchar2 DEFAULT 'write_host_file.log' ) IS
    v_outfile utl_file.file_type;
    begin
    wk_substr_len:=p_line_length;
    if p_destination='file' then
    v_outfile := open_file_fun(p_status, p_dirname, p_filename);
    end if;
    LOBPrint(p_str,p_destination,v_outfile);
    if p_destination='file' then
    utl_file.fclose(v_outfile);
    end if;
    end output_clob;
    --- loops through blocks of text by delimiter (carriage return)
    --- and writes to either the screen or file
    --- (output to screen needs work for clob...currently using
    --- "output_str" instead for <32k strings instead)
    --- inputs: CLOB for output
    --- destination (currently allows "screen" and "file")
    --- filehandle (open filehandle from openfile routine)
    PROCEDURE LOBPrint(
    p_str clob,
    p_destination varchar2,
    v_outfile utl_file.file_type default null ) is
    ---------------local working variables
    wk_str max_str_type; --MAX=32767
    wk_offset INTEGER := 1;
    wk_clob clob;
    wk_clob_len number;
    wk_clob_len2 number;
    wk_max_loops number:=70000;
    begin
    wk_clob_len:= dbms_lob.getlength(p_str);
    if wk_clob_len <= MAX_STR_LEN
    and p_destination='file' then
    --- NOTE: dbms_lob.substr parameters are OPPOSITE of sql substr
    utl_file.put_line(v_outfile, dbms_lob.substr( p_str, wk_clob_len, 1));
    elsif wk_clob_len > MAX_STR_LEN then
    dbms_lob.createtemporary(wk_clob, TRUE, dbms_lob.call);
    --- wk_clob: LOB locator of the copy target.
    --- p_str: LOB locator of source for the copy.
    --- wk_clob_len: Number of bytes (for BLOBs) or characters (for CLOBs)
    --- to copy.
    --- 1: Offset in bytes or characters in the destination LOB
    --- (origin: 1) for the start of the copy.
    --- 1: Offset in bytes or characters in the source LOB
    --- (origin: 1) for the start of the copy.
    dbms_lob.copy(wk_clob, p_str, wk_clob_len, 1, 1);
    LOOP
    wk_str:=word_parse_trim_lob_FUN(wk_clob,wk_CR);
    if p_destination='file' then
    utl_file.put_line(v_outfile, wk_str);
    elsif p_destination='screen' then
    dbms_output.put_line(wk_str);
    end if;
    wk_clob_len2:= dbms_lob.getlength(wk_clob);
    EXIT WHEN wk_clob is null ;
    END LOOP;
    end if;
    END LOBPrint;
    --- "function with side-effect"
    --- input is CLOB, with is "returned" without leading field
    --- additional parameter is field (or token) delimiter
    --- value returned is leading field from input string
    FUNCTION word_parse_trim_lob_FUN(o_str IN OUT NOCOPY clob,
    p_delimiter IN varchar2) RETURN varchar2
    IS
    o_token max_str_type;
    clob_len number;
    next_pos number;
    wk_clob clob;
    BEGIN
    clob_len:= dbms_lob.getlength(o_str);
    next_pos:= dbms_lob.instr(o_str, p_delimiter, 1, 1);
    if next_pos != 0 then
    -- NOTE: dbms_lob.substr parameters are OPPOSITE of sql substr
    dbms_lob.createtemporary(wk_clob, TRUE, dbms_lob.call);
    o_token:= dbms_lob.substr( o_str, next_pos-1, 1);
    -- o_str:= dbms_lob.substr(o_str,clob_len-next_pos,next_pos+1);
    if next_pos = clob_len then
    wk_clob := null;
    else
    --- wk_clob: LOB locator of the copy target.
    --- o_str: LOB locator of source for the copy.
    --- clob_len: Number of bytes (for BLOBs) or characters (for CLOBs)
    --- to copy.
    --- 1: Offset in bytes or characters in the destination LOB
    --- (origin: 1) for the start of the copy.
    --- next_pos+1: Offset in bytes or characters in the source LOB
    --- (origin: 1) for the start of the copy.
    dbms_lob.copy(wk_clob, o_str, clob_len, 1, next_pos+1);
    end if;
    else
    o_token:= dbms_lob.substr( o_str, MAX_STR_LEN, 1);
    end if;
    o_str := wk_clob;
    RETURN(o_token);
    EXCEPTION
    when others then
    null;
    -- dbms_output.put_line('Error:'||SQLCODE||',text:'||SQLERRM);
    END word_parse_trim_lob_FUN;

  • How to write XML Parser??

    Hi all,
    i have an XML file and its structure is like this and i have to write a parser to get the details from this XML and put it in the nodes.
    Please help me out in the procedure and code
    <?xml version="1.0" encoding="UTF-8" ?>
    - <GAEB xmlns="http://xxxxxxx_XML/200407">
    - <GAEBInfo>
      <Version>3.1</Version>
      <VersDate>2007-06</VersDate>
      <Date>2009-02-15</Date>
      <Time>15:11:12</Time>
      <ProgSystem />
      <ProgName>CONSTRUCTION_SUITE V12.4.342</ProgName>
      </GAEBInfo>
    - <PrjInfo>
      <NamePrj>SAP2</NamePrj>
      <LblPrj>The Pad on Plot No.BB.B01.061 at Business Bay</LblPrj>
      <Cur>ser</Cur>
      <CurLbl>trt</CurLbl>
      <AlterBidPerm>Yes</AlterBidPerm>
      </PrjInfo>
    - <Award>
      <DP>81</DP>
    - <AwardInfo>
      <Cur>ser</Cur>
      <CurLbl>trt</CurLbl>
      </AwardInfo>
    - <OWN>
      <Address />
      </OWN>
    - <BoQ ID="DAODAAAA">
    - <BoQInfo>
      <Name>02</Name>
      <LblBoQ>Bill NO.2 - Site Work</LblBoQ>
      <Date>2008-07-02</Date>
      <OutlCompl>AllTxt</OutlCompl>
    - <BoQBkdn>
      <Type>BoQLevel</Type>
      <LblBoQBkdn>Division</LblBoQBkdn>
      <Length>2</Length>
      <Num>Yes</Num>
      </BoQBkdn>
    - <BoQBkdn>
      <Type>Item</Type>
      <Length>1</Length>
      <Num>No</Num>
      <Alignment>left</Alignment>
      </BoQBkdn>
    - <BoQBkdn>
      <Type>Index</Type>
      <Length>1</Length>
      <Num>No</Num>
      <Alignment>left</Alignment>
      </BoQBkdn>
      </BoQInfo>
    - <BoQBody>
    - <BoQCtgy ID="DBAHAAAA" RNoPart="1">
    - <LblTx>
    - <p>
      <span>Page No.2/1</span>
      </p>
      </LblTx>
    - <BoQBody>
    - <Itemlist>
    - <Remark ID="DBAHADGA">
    - <Description>
    - <CompleteText>
    - <DetailTxt>
    - <Text>
    - <p style="text-align:left;">
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">SITE WORKS</span>
      <br />
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">EARTH WORKS</span>
      <br />
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">Excavate in any material from reduced level (-7.6</span>
      <br />
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">DMD) including levelling and compacting the bottom</span>
      <br />
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">of excavation as specified in stages as necessary</span>
      </p>
      </Text>
      </DetailTxt>
    - <OutlineText>
    - <OutlTxt>
    - <TextOutlTxt>
    - <p>
      <span>SITE WORKS</span>
      <br />
      <span>EARTH WORKS</span>
      <br />
      <span>Excavate in any material from reduced level (-7.6</span>
      <br />
      <span>DMD) including levelling and compacting the bottom</span>
      <br />
      <span>of excavation as specified in stages as necessary</span>
      </p>
      </TextOutlTxt>
      </OutlTxt>
      </OutlineText>
      </CompleteText>
      </Description>
      </Remark>
    - <Item ID="DBAHAEOA" RNoPart="A">
      <Qty>8738.000</Qty>
      <PredQty>8738.000</PredQty>
      <QU>m3</QU>
    - <Description>
    - <CompleteText>
    - <DetailTxt>
    - <Text>
    - <p style="text-align:left;">
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">Excavation to raft foundation</span>
      </p>
      </Text>
      </DetailTxt>
    - <OutlineText>
    - <OutlTxt>
    - <TextOutlTxt>
    - <p>
      <span>Excavation to raft foundation</span>
      </p>
      </TextOutlTxt>
      </OutlTxt>
      </OutlineText>
      </CompleteText>
      </Description>
      </Item>
    - <Remark ID="DBAHAHJI">
    - <Description>
    - <CompleteText>
    - <DetailTxt>
    - <Text>
    - <p style="text-align:left;">
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">Disposal</span>
      </p>
      </Text>
      </DetailTxt>
    - <OutlineText>
    - <OutlTxt>
    - <TextOutlTxt>
    - <p>
      <span>Disposal</span>
      </p>
      </TextOutlTxt>
      </OutlTxt>
      </OutlineText>
      </CompleteText>
      </Description>
      </Remark>
    - <Item ID="DBAHAJBI" RNoPart="B">
      <Qty>8738.000</Qty>
      <PredQty>8738.000</PredQty>
      <QU>m3</QU>
    - <Description>
    - <CompleteText>
    - <DetailTxt>
    - <Text>
    - <p style="text-align:left;">
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">Disposal of excavated materials, away from site to</span>
      <br />
      <span style="font-family:Arial;font-size:medium;color:rgb(0,0,0);">approved tips as directed by the Engineer</span>
      </p>
      </Text>
      </DetailTxt>
    - <OutlineText>
    - <OutlTxt>
    - <TextOutlTxt>
    - <p>
      <span>Disposal of excavated materials, away from site to</span>
      <br />
      <span>approved tips as directed by the Engineer</span>
      </p>
      </TextOutlTxt>
      </OutlTxt>
      </OutlineText>
      </CompleteText>
      </Description>
      </Item>
        </Itemlist>
      </BoQBody>
      </BoQCtgy>
      </BoQBody>
      </BoQ>
      </Award>
      </GAEB>
    Thanks,
    Suresh

    Hi,
    Following are some of them DOM,SAX ...
    http://www.devx.com/xml/Article/16921
    Regards
    Ayyapparaj

  • How to write script to update the ip address

    Hi all,
    I need a help to write a script write on my Mac OS 10.10.1
    I have a dynamic DNS that need to update through a URL for the new  public IP address.
    The script to get the current external IP address
    curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' 
    This is the URL need to update everything 5 minutes with the output of the current public Ip address or it can detect the change if change then do update if no then do nothing,
    https://domain.com/update?host=ab&domain=abc.com&password=xx&ip=1.1.1.1
    Thanks for the help

    Storing passwords in a shell script is an EXTREMELY bad idea. The following will get the current IP address, validate the IP address, test whether the IP address has change by reading the file /var/tmp/stored_ip or create the file if it doesn't exits- DO YOUR COMMAND HERE is the line that I am going to let you figure out.
    #!/bin/ksh
    new_ip="$(/usr/bin/curl -s https://icanhazip.com/)"
    if [ -f /var/tmp/stored_ip ]; then
        if /usr/bin/host $new_ip > /dev/null 2>&1; then
            printf "%s\n" "Valid IP address found"
        else
            printf "%s\n" "Invalid IP address"
            exit 1   
        fi
    else
        printf "%s\n" "$new_ip" > /var/tmp/stored_ip
        exit 1
    fi
    read -r stored_ip < /var/tmp/stored_ip
    if [ "$new_ip" = "$stored_ip" ]; then
        printf "%s\n" "IP address has not changed"
    else
        DO YOUR COMMAND HERE
    fi
    printf "%s\n" "$new_ip" > /var/tmp/stored_ip
    exit 0

  • How to write xml from odi model directly to XMLType field in database?

    I've created xml model and populated it with data.
    How can I save it directly to the XMLType field in Oracle 10g database?

    You only have the option of all or nothing, you don't have the option of writing one file for each of the root elements.
    SYNCHRONIZE to FILE
    See the Driver doc at: http://download.oracle.com/docs/cd/E14571_01/integrate.1111/e12644/appendix_xml_driver.htm#CHDICHDB
    and specifically: http://download.oracle.com/docs/cd/E14571_01/integrate.1111/e12644/appendix_xml_driver.htm#CHDGDDDF

  • How to write xml files

    I have a simple jsp page having name and id field, when user submits the page, it will create a xml file having datas of the user entered.and later if another user add his data, then it will update the xml file

    Extract the name, id whatever fields from the jsp page into a bean after submit. Then you can use DOM or SAX parser implementation to create a new xml file for the values you are now in your bean from jsp page.
    You can create the XML using DOM or SAX parsers. The implementation of those are almost easy. For better work you can also use JAXB if the application is complex or the XML format is complex and huge.
    -Sachin
    I have a simple jsp page having name and id field,
    when user submits the page, it will create a xml
    file having datas of the user entered.and later if
    another user add his data, then it will update the
    xml file

  • Using kxml2 to write xmls

    hi everybody i wanna read and write xmls in movile application, somebody here told me to use kxml, i downloaded kxml2 but there is no documentation about how to write xml just how to read, any link you could provide me? pleaseeeeeee or another package to use..

    I'm not sure that I understand the nature of your question. You are inserting data into a spreadsheet, which is composed entirely of cells, so you have to tell Excel into which cells you want to insert your data. If you don't care which cells they go into, why not just specify (0,0)? Is there any particular reason why you don't want to specify a range?
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • Write XML in specific line

    How to write XML file in specific line or specific value ? i want write selectedLayers[0].opasity OR scale in XML file in specific line (btn2)
    XML file (0000.xml)
    <xml>
              <btn1>56</btn1>
              <btn2>666</btn2>
              <btn3>23</btn3>
    </xml>                                    
    Read file
    comp = app.project.activeItem
    var config = new File ("/g/0000.xml");
                            config.open("r");
                   var xmlString = config.read();
                    var myXML = new XML(xmlString);
    comp.selectedLayers[0].opacity.setValue(parseFloat(myXML.btn1))
                   config.close();
    and how write in specific line?
    config.open("w");
    xxx = btn1 = "245"
    config.write(xxx)

    i try this
    function SaveFile() {
    config.write("<xml>\n<btn1>"+opacity.value+"</btn1>\n</xml>")
    not what I wanted but its work... and if you want array parameter, use this:
    config.write("<xml>\n<btn1>"+position.value[0]+","+position.value[1]+"</btn1>\n</xml>")

  • How to write the nodevalue back to xml file?

    Hi, Everybody:
    These are two packages I used. javax.xml.parsers.*,org.w3c.dom.*
    Now I use "setNodeValue("abc") to set the node value to "abc". But it is not really saved back into XML file. It only change the node value in memory.
    How to write the changes back to XML file? Thank you very much for your help.
    Michelle

    * Version : 1.00
    * File Purpose : Given the xml file loads into dom and recreate the file with the updated values.
    * Developer : Kashif Qasim : 25/july/04
    * Modify detail :
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.*;
    public class XMLWriter
    private String displayStrings[] = new String[5000];
    private int numberDisplayLines = 0;
    private Document document;
    //private final Node c;
    public synchronized void displayDocument(String uri,Vector UpdatedValues,String getTaskID)
    try {
    DOMParser parser = new DOMParser();
    parser.parse(uri);
    document = parser.getDocument();
    display(document, "",UpdatedValues);
    } catch (Exception e) {
    e.printStackTrace(System.err);
    ReadXmlConfig objReadXmlConfig = null;
    FileWriter filewriter = null;
    try {
    filewriter = new FileWriter(uri);
    for(int loopIndex = 0; loopIndex < numberDisplayLines; loopIndex++){
    filewriter.write(displayStrings[loopIndex].toCharArray());
    //System.out.println("displayStrings[loopIndex].toCharArray() "+displayStrings[loopIndex].toString());
    //filewriter.write("\n");
    filewriter.close();
    System.gc();
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSLog("File updated for "+getTaskID+" succesfully, file is closed now ");
    } catch (IOException e) {
    System.err.println("Caught IOException: " + e.getMessage());
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSErrorLog("File updated FAILED for "+getTaskID+". Reason for file error "+e.toString());
    }finally {
    if (filewriter != null) {
    System.out.println("Closing File");
    objReadXmlConfig =null;
    try{
    filewriter.close();
    }catch(IOException e){
    System.err.println("Caught IOException: " + e.getMessage());
    } else {
    System.out.println("File not open");
    private void display(Node node, String indent, Vector UpdtRecs)
    if (node == null) {
    return;
    int type = node.getNodeType();
    NodeList nodeList = document.getElementsByTagName("QueryParm");
    int TotalRecs = UpdtRecs.size();
    switch (type) {
    case Node.DOCUMENT_NODE: {
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] +=
    "<?xml version=\"1.0\" encoding=\""+
    "UTF-8" + "\"?>";
    numberDisplayLines++;
    displayStrings[numberDisplayLines] += "\n";
    display(((Document)node).getDocumentElement(), "",UpdtRecs);
    break;
    case Node.ELEMENT_NODE: {
    if(node.getNodeName().equals("QueryParm")) {
    for(int i =0 ; i< nodeList.getLength() ; i++)
    Node nodeQry = nodeList.item(i);
    NamedNodeMap nnp = nodeQry.getAttributes();
    for(int j= 0 ; j < nnp.getLength() ; j++)
    Attr atr = (Attr) nnp.item(j);
    if(atr.getName().equalsIgnoreCase("value_"+(i+1)))
    //System.out.println(atr.getName() +" : " + atr.getNodeValue() );
    atr.setNodeValue(UpdtRecs.get(i).toString());
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] += "<";
    displayStrings[numberDisplayLines] += node.getNodeName();
    int length = (node.getAttributes() != null) ?
    node.getAttributes().getLength() : 0;
    Attr attributes[] = new Attr[length];
    for (int loopIndex = 0; loopIndex < length; loopIndex++) {
    attributes[loopIndex] = (Attr)node.getAttributes().item(loopIndex);
    for (int loopIndex = 0; loopIndex < attributes.length; loopIndex++) {
    Attr attribute = attributes[loopIndex];
    displayStrings[numberDisplayLines] += " ";
    displayStrings[numberDisplayLines] += attribute.getNodeName();
    displayStrings[numberDisplayLines] += "=\"";
    displayStrings[numberDisplayLines] += attribute.getNodeValue();
    displayStrings[numberDisplayLines] += "\"";
    displayStrings[numberDisplayLines]+=">";
    numberDisplayLines++;
    NodeList childNodes = node.getChildNodes();
    if (childNodes != null) {
    length = childNodes.getLength();
    indent += " ";
    for (int loopIndex = 0; loopIndex < length; loopIndex++ ) {
    display(childNodes.item(loopIndex), indent,UpdtRecs);
    break;
    case Node.CDATA_SECTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<![CDATA[";
    displayStrings[numberDisplayLines] += node.getNodeValue();
    displayStrings[numberDisplayLines] += "]]>";
    numberDisplayLines++;
    break;
    case Node.TEXT_NODE: {
    displayStrings[numberDisplayLines] = "";
    String newText = node.getNodeValue().trim();
    if(newText.indexOf("\n") < 0 && newText.length() > 0) {
    displayStrings[numberDisplayLines] += newText;
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    case Node.PROCESSING_INSTRUCTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<?";
    displayStrings[numberDisplayLines] += node.getNodeName();
    String text = node.getNodeValue();
    if (text != null && text.length() > 0) {
    displayStrings[numberDisplayLines] += text;
    displayStrings[numberDisplayLines] += "?>";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    if (type == Node.ELEMENT_NODE) {
    displayStrings[numberDisplayLines] = indent.substring(0,
    indent.length() - 4);
    displayStrings[numberDisplayLines] += "</";
    displayStrings[numberDisplayLines] += node.getNodeName();
    displayStrings[numberDisplayLines] += ">";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    indent += " ";
    public static void main(String args[])
    Vector xmlValue = new Vector();
    xmlValue.add(0,"Kashif");
    xmlValue.add(1,"Qasim");
    //displayDocument("NewMediation.xml",xmlValue);
    <?xml version="1.0" encoding="UTF-8"?>
    <Mediation>
    <Task1>
    <Source>
    <SourceDriver>com.microsoft.jdbc.sqlserver.SQLServerDriver</SourceDriver>
    <SourceConnection>jdbc:microsoft:sqlserver://10.2.1.58:1433;DatabaseName=MTCVB_HDS;</SourceConnection>
    <SourceUser>sa</SourceUser>
    <SourcePassword>sa</SourcePassword>
    <Table>
    <SourceTable>t_Agent</SourceTable>
    <SourceQuery><![CDATA[SELECT SkillTargetID,PersonID,PeripheralID,EnterpriseName,PeripheralNumber,Deleted,TemporaryAgent,AgentStateTrace,ChangeStamp FROM t_Agent where SkillTargetID > {value_1} order by SkillTargetID]]>
    </SourceQuery>
    <SourceParm BusinessRule="" ColumnName="SKILLTARGETID" ColumnNumber="1" DataType="Numeric" DefaultValue="0" Format="mm/dd/yyyy xx:xx:xx XX">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERSONID" ColumnNumber="2" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALID" ColumnNumber="3" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="ENTERPRISENAME" ColumnNumber="4" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALNUMBER" ColumnNumber="5" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="DELETED" ColumnNumber="6" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="TEMPORARYAGENT" ColumnNumber="7" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="AGENTSTATETRACE" ColumnNumber="8" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="CHANGESTAMP" ColumnNumber="9" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <QueryParm FldName_1="SkillTargetID" FldType_1="Number" value_1="0">
    </QueryParm>
    </Table>
    </Source>
    </Task1>
    </Mediation>
    The QueryParm values are updated thru this code :)
    Hope it helps u ...

  • How to write a procedure to load the data into a table using xml file as input to the procedure?

    Hi,
    Iam new to the xml,
    can u please anyone help me how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me.
    <?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>.
    Regards,
    vikram.

    here is the your XML parse in 11g :
    select *
      from xmltable('//Entity' passing xmltype
    '<?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>
    ') columns
      "dcode" varchar2(4000) path '/Entity/dcode',
      "ddesc" varchar2(4000) path '/Entity/ddesc',
      "reauthflag" varchar2(4000) path '/Entity/reauthflag'
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    Using this parser you can create procedure as
    SQL> create or replace procedure myXMLParse(x clob) as
      2  begin
      3    insert into MyXmlTable
      4      select *
      5        from xmltable('//Entity' passing xmltype(x) columns "dcode"
      6                      varchar2(4000) path '/Entity/dcode',
      7                      "ddesc" varchar2(4000) path '/Entity/ddesc',
      8                      "reauthflag" varchar2(4000) path '/Entity/reauthflag');
      9    commit;
    10  end;
    11 
    12  /
    Procedure created
    SQL>
    SQL>
    SQL> exec myXMLParse('<?xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>');
    PL/SQL procedure successfully completed
    SQL> select * from MYXMLTABLE;
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    SQL>
    Ramin Hashimzade

Maybe you are looking for

  • How do I download my MAC contacts to my new gmail acct.?

    How do I download my contacts on my MAC osx to my new gmail acct.? I need to send an email to all my contacts using gmail. Thank you for your help.

  • SSL code returns HTTPClient.HttpURLConnection

    Challenge: connect to a secured site to post some data. Issue: tried several ways, HTTPSURLConnection is not getting obtained, just HTTPClient.HttpURLConnection every time. Environment: OS - Linux, version 2.6.9. java.version: 1.5.0_10. Server: Oracl

  • Problems with hooking

    I've come across an interesting situation which I'm lost in. I'm trying to hook into an application via to check for mouse clicks. I have that portion of the code working with what I have. My comparison comes from the handle of the window I want to c

  • Release F110 payment run

    I ran the F110 payment cycle for one vendor using today's date - enter parameters, created proposal, scheduled payment run for today, start immediately.  However, vendor had pymt terms on net30 so no check run was completed.  Question is how do I rel

  • How to display preceding zero's

    hi, In the standard purchase order script i want to display material number including preceding zero's. can anyone suggest me the solution? regards prajwala