How to read XML using vbscript

hi friends I have A big XML having following format :
<ECSC>
<ATTRIBUTES>
<ETTOOLNAME>ECATT</ETTOOLNAME>
<ETOBJ_GNDT>
<VERSION>00000001</VERSION>
<TWB_TITLE>TF_FI_FP_FI_0569_MS07_CO_Search_Help_Internal_Orders_vTD0_1_EN.x</TWB_TITLE>
<TWB_STATUS>X</TWB_STATUS>
<TWB_RELE>N</TWB_RELE>
<FUSER>ECATT</FUSER>
<FDATE>2014-05-22</FDATE>
<LUSER>ECATT</LUSER>
<LDATE>2014-05-22</LDATE>
<LTIME>13:59:50</LTIME>
</ETOBJ_GNDT>
<ETOBJNOVER>
<NAME>ZX_FI_FP_0569_MS07_COAS_FB01</NAME>
<TYPE>ECSC</TYPE>
<TWB_RESP>ECATT</TWB_RESP>
<TWB_DISTL>B</TWB_DISTL>
<DEVCLASS>Z_SOL_ONEERP</DEVCLASS>
<MASTERLANG>E</MASTERLANG>
<TADIR_RESP>ECATT</TADIR_RESP>
<FRANGE>BC</FRANGE>
</ETOBJNOVER>
<ETOBJ_DOC>
<SEARCH_1>FI_FP_FI_0569_MS07</SEARCH_1>
<SEARCH_2>COAS</SEARCH_2>
<SEARCH_3>KO03</SEARCH_3>
</ETOBJ_DOC>
<ETOBJ_CNST>
<TWB_WKREQ>0.000</TWB_WKREQ>
<TWB_PRIO>3</TWB_PRIO>
</ETOBJ_CNST>
<ETSC_TSYS>
<SYSTEMDATA>Z_SD_1ERP_Z</SYSTEMDATA>
<TESTSYSTEM>FI_TRUSTED_EN</TESTSYSTEM>
</ETSC_TSYS>
<ETSYS_COMP_TABTYPE/>
<ETSYS_REL_TABTYPE/>
</ATTRIBUTES>
<SCRIPT>
<ETXML_LINE_TABTYPE>
<item>***********************************************************************.</item>
<item>* Information.</item>
<item>**********************************************************************.</item>
<item>* Script for test case 'TF_FI_FP_FI_0569_MS07_CO_Search_Help_Internal_Orders_vTD0_1_EN.x'</item>
<item>*</item>
<item>* For Sub script:</item>
<item>*  'Test case 3: Choose an Internal Order in One.Fi using external order number while transaction posting (positive case)'.</item>
<item>*</item>
<item>* Script is to Display Internal Order using external order number while Transaction Posting 'FB01'</item>
<item>* GETTAB command is being used to fetch the data from table 'COAS'.</item>
<item>*</item>
<item>*</item>
<item>*     Test data related Information</item>
<item>*     -----------------------------</item>
<item>* Default test data present in parameter list has been used while Scripting ( script recording &amp; Performing Checks ).</item>
<item>*</item>
<item>* Final execution of result log: 0000037077.</item>
<item>*</item>
<item>***********************************************************************.</item>
<item>* Preparation.</item>
<item>***********************************************************************.</item>
<item/>
<item/>
<item>***********************************************************************.</item>
<item>* End Preparation.</item>
<item>************************************************************************.</item>
<item/>
<item/>
<item>***********************************************************************.</item>
<item>* Execution.</item>
<item>***********************************************************************.</item>
<item>* To get the 'Table Entries' from table 'COAS'.</item>
<item>  GETTAB ( COAS , COAS_1 ).</item>
<item>* To display the value for the field 'External Order No'.</item>
<item>  LOG ( V_EXTERNAL_ORDER_NO_FRM_TABL ).</item>
<item/>
<item>*----------------------Posting(FB01)-------------------------------------------*.</item>
<item/>
<item>* This part of Script is to Display Internal Order using external order number while Transaction Posting 'FB01'.</item>
<item>MESSAGE ( MSG_1 ).</item>
<item>* To get the name of the Title Screen.</item>
<item>  GETGUI ( FB01_100_STEP_1 ).</item>
<item>* Enter the Required details and Press Enter.</item>
<item>  SAPGUI ( FB01_100_STEP_2 ).</item>
<item>* Enter Amount and Tax Code.</item>
<item>* and, Press F4 help in the Order Field.</item>
<item>  SAPGUI ( FB01_300_STEP_1 ).</item>
<item>* In F4 screen, enter the 'External Order Number'</item>
<item>* pop-up screen is displayed with entries like Order, Description and External Order Number and select 1st order row, press Enter.</item>
<item>  SAPGUI ( FB01_200_STEP_1 ).</item>
<item>* To get the values for the field 'Order, Description and External Order No' from F4 help.</item>
<item>  GETGUI ( FB01_120_STEP_1 ).</item>
<item>  SAPGUI ( FB01_120_STEP_3 ).</item>
<item>* To get the value for the field 'Order' from Main screen.</item>
<item>  GETGUI ( FB01_300_STEP_2 ).</item>
<item>* click on 'F3' back button.</item>
<item>  SAPGUI ( FB01_300_STEP_3 ).</item>
<item>* click on 'F3' back button.</item>
<item>  SAPGUI ( FB01_700_STEP_1 ).</item>
<item>* click 'Yes' button.</item>
<item>  SAPGUI ( FB01_200_STEP_2 ).</item>
<item>* click on 'F3' back button.</item>
<item>  SAPGUI ( FB01_100_STEP_3 ).</item>
<item>ENDMESSAGE ( E_MSG_1 ).</item>
<item/>
<item>* To display the Title Screen.</item>
<item>  LOG ( V_TITLE_SCREEN ).</item>
<item>* To display the 'Order' Number from F4 help.</item>
<item>  LOG ( V_ORDER_NO_FROM_F4 ).</item>
<item>* To display the 'Description' from F4 help.</item>
<item>  LOG ( V_DESCRIPTION_FROM_F4).</item>
<item>* To display the 'External Order no' value from F4 help.</item>
<item>  LOG ( V_EXTERNAL_ORDER_NO_FROM_F4 ).</item>
<item>* To display the 'Order' Number from main screen.</item>
<item>  LOG ( V_ORDER_NO_FRM_MAIN_SCREEN ).</item>
<item>************************************************************************.</item>
<item>* End Execution.</item>
<item>***********************************************************************.</item>
<item/>
<item>***********************************************************************.</item>
<item>* Check.</item>
<item>***********************************************************************.</item>
<item>* To check name of Title screen for transaction FB01.</item>
<item>  CHEVAR ( V_TITLE_SCREEN = I_TITLE_SCREEN ).</item>
<item>* To check the value for the field 'External Order No' from F4 help, which should be equal to 'External Order No' from table.</item>
<item>  CHEVAR ( V_EXTERNAL_ORDER_NO_FRM_TABL = V_EXTERNAL_ORDER_NO_FROM_F4 ).</item>
<item>* To check the values for the field 'Order' number from Table, which should be equal to 'Order' no from F4 screen and Main screen.</item>
<item>  CHEVAR ( ( I_ORDER_NUMBER_FROM_TABLE = V_ORDER_NO_FROM_F4 ) AND ( I_ORDER_NUMBER_FROM_TABLE = V_ORDER_NO_FRM_MAIN_SCREEN )).</item>
<item>************************************************************************.</item>
<item>* End Check.</item>
<item>************************************************************************.</item>
</ETXML_LINE_TABTYPE>
</SCRIPT>
<PARAMETERS>
                 <ETPAR_GUIX>
<item>
<PNAME>COAS_1</PNAME>
<PTYP>X</PTYP>
<PDESC>Generated Table for View</PDESC>
<PINDEX>0001</PINDEX>
<PGROUP>GETTAB</PGROUP>
<XMLREF_TYP>T</XMLREF_TYP>
<PSTRUC_TYP>T</PSTRUC_TYP>
<PREF_TYPE>VIEW</PREF_TYPE>
<PREF_NAME>COAS</PREF_NAME>
<PDATLEN>0000</PDATLEN>
<PINTLEN>000000</PINTLEN>
<PDECIMALS>000000</PDECIMALS>
<SORT_LNR>0001</SORT_LNR>
<PREF_NAME2>COAS</PREF_NAME2>
<VALUE>&lt;VALUE&gt;</VALUE>
<VAL_TYPE>T</VAL_TYPE>
<TAB_INDEX>0</TAB_INDEX>
                          </item>
<item>
<PNAME>IOAS_1</PNAME>
<PTYP>I</PTYP>
<PDESC>Generated Table for View</PDESC>
<PINDEX>0001</PINDEX>
<PGROUP>IETTAB</PGROUP>
<XMLREF_TYP>T</XMLREF_TYP>
<PSTRUC_TYP>T</PSTRUC_TYP>
<PREF_TYPE>VIEW</PREF_TYPE>
<PREF_NAME>COAS</PREF_NAME>
<PDATLEN>0000</PDATLEN>
<PINTLEN>000000</PINTLEN>
<PDECIMALS>000000</PDECIMALS>
<SORT_LNR>0001</SORT_LNR>
<PREF_NAME2>COAS</PREF_NAME2>
<VALUE>&lt;VALUE&gt;</VALUE>
<VAL_TYPE>T</VAL_TYPE>
<TAB_INDEX>0</TAB_INDEX>
                        </item>
 </ETPAR_GUIX>
</PARAMETERS>
</ECSC>
I want to write vbscript for above XML file. Vbscript should display following result :
1) It should validate <SCRIPT> node The line staring with * symbol is called comment and the line staring without * symbol is call code in above XML file.
2) Vb Script should display such line numbers those code don't have any comment line specified.
for example : In above XML the code line : <item>  SAPGUI ( FB01_120_STEP_3 ).</item> it doesn't have any comment line means this code don't have any comment. So vbscript should find such line numbers and code text and show error message.
3) Each code had its own comment just above line of code.
4) In <PARAMETER> node we have to check <PNAME> is staring with letter "I" or not.. If its staring with letter "I" then its <PTYPE> and <PGROUP> staring letter should be "I". We have to check this condition
for every child node of <PARAMETER> node using vbscript.
 Please help me and Thank You so much in advance.
My Vb Script is as follows :
filename = "D:\Automation\o.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filename)
fl=0
Do Until f.AtEndOfStream
                strLine = f.ReadLine
                if (strLine ="MESSAGE ( MSG_1 ).") then
                            Document.write("<br>Inside MESSAGE ")
                                 Do until f.AtEndOfStream
                                                strLine = f.ReadLine
                                                                if((Left(strLine,1)="*"))
Then
                                                                if((Right(strLine,1)="."))
then 
      Document.write("<br>ERROR Found  at Line No :" & f.line-1&" "& strLine)
                                                                end if
                                                                 fl=1
                                                else 
                                                                if((Right(strLine,1)=".")
and (fl=1))Then
      fl=0
    else
      Document.write("<br>ERROR Found  at Line No :" & f.line-1&" "& strLine)
                                                                end if
                                                end if
                          Loop
end if
   And the following code for <PARAMETER> tag :
Const XMLDataFile = "D:\Automation\imp\p.xml"
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(XMLDataFile)
 xmlDoc.validateOnParse = True  
 If xmlDoc.Load(XMLDataFile) Then 
          Document.write "SUCCESS loading XML File"  
 Else  
     Document.write "ERROR loading XML File"  
      End If
counter=0  
Set root = xmlDoc.documentElement
Set items = root.childNodes
for each item in items
    myPNAME = xmlDoc.getElementsByTagName("PNAME").item(counter).text
    myPTYP = xmlDoc.getElementsByTagName("PTYP").item(counter).text
    myPGROUP = xmlDoc.getElementsByTagName("PGROUP").item(counter).text
    If (Left(myPNAME, 1) = "I") Then
        'Document.write("myPNAME Starts with I")
        IsValid = True
        'Innocent until proven guilty
        If (Left(myPTYP, 1) <> "I") Then
            IsValid = False
        End If
        If (Left(myPGROUP, 1) <> "I" )Then
            IsValid = False
        End If
        If IsValid = False Then
            Document.write(myPNAME & " is not valid.")
        End If
        IsValid = True
    End If
    If (Left(myPNAME, 1) = "V") Then
        'Document.write("myPNAME Starts with I")
        IsValid = True
        'Innocent until proven guilty
        If (Left(myPTYP, 1) <> "V") Then
            IsValid = False
        End If
        If (Left(myPGROUP, 1) <> "V" )Then
            IsValid = False
        End If
        If IsValid = False Then
            Document.write(myPNAME & " is not valid.")
        End If
        IsValid = True
    End If
If (Left(myPNAME, 1) = "E") Then
        'Document.write("myPNAME Starts with I")
        IsValid = True
        'Innocent until proven guilty
        If (Left(myPTYP, 1) <> "E") Then
            IsValid = False
        End If
        If (Left(myPGROUP, 1) <> "E" )Then
            IsValid = False
        End If
        If IsValid = False Then
            Document.write(myPNAME & " is not valid.")
        End If
        IsValid = True
    End If
counter=counter+1
next
                                                                

Here is a better example of how to pull all of the text.
strXmlFile = "D:\Automation\imp\p.xml"
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
If xmlDoc.Load(strXmlFile) Then
WScript.Echo "SUCCESS loading XML File"
Else
WScript.Echo "ERROR loading XML File"
End If
Set items = xmlDoc.SelectNodes("//SCRIPT/ETXML_LINE_TABTYPE/item")
For Each item In items
WScript.Echo item.Text
Next
¯\_(ツ)_/¯

Similar Messages

  • How to read xml

    I'm getting xml from   customFieldsFeed.getEnumerationValues()  it is comming from  a web services looks like this
    <xml-fragment xmlns:b=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""
    xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""
    xmlns:a=""http://schemas.xxxxxxxx""
    xmlns:u=""http://docs.oasis-open.org/wss/xxxxxxx-utility-1.0.xsd""
    xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>AAAAA</a:EnumerationID>
        <a:Name>A3 MFD</a:Name>
      </b:anyType>
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>BBBBB</a:EnumerationID>
        <a:Name>A3 Printer</a:Name>
      </b:anyType>
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>CCCCC</a:EnumerationID>
        <a:Name>A4 MFP</a:Name>
      </b:anyType>
    </xml-fragment>"
    I need to read EnumerationID ex if AAAAA need to retrive Name value " A3 MFD"
    java 1.6
    Thanks,
    HJ

    This could be a starting point:
    http://stackoverflow.com/questions/2811001/how-to-read-xml-using-xpath-in-java
    bye
    TPD

  • How to read XML SpreadSheet using OleDb Provider

    Hi All,
    I have generated an xml spreadsheet (*.xls) using XSL. I have another program that reads this spreasheet and processes it.
    Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
    Dim objCon As OleDbConnection = New OleDbConnection(sConnectionString)
    objCon.Open()
    Dim objCmdSelect As OleDbCommand = New OleDbCommand("SELECT * FROM [General$]", objCon)
    Dim objAdapater As OleDbDataAdapter = New OleDbDataAdapter()
    objAdapater.SelectCommand = objCmdSelect
    Dim _DSGen As DataSet = New DataSet()
    objAdapater.Fill(_DSGen)
    I m facing an issue while opening a connection to the generated spreadsheet. It says "{"External table is not in the expected format."}".
    My Connection string is
    "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
    Do i need to change anything to this string ? I tried using a dataset and calling dataSet.ReadXml(excelFileName); But the dataset doesnt contain my table. Any inputs on how to read an xml spreadsheet ?
    How to read XML SpreadSheet in OleDb? How to Convert XML SpreadSheet to Microsoft Office Excel Sheet?
    Many Thanks

    Hi,
    You'lll most likely have better luck posting this in a Microsoft forum. This forum deals with issues specific to querying the Oracle database via the Oracle OLEDB provider.
    Cheers,
    Greg

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • How can I script Adobe Reader updates using vbScript, PowerShell or C#?

    I would like to script Adobe Reader updates using vbScript, PowerShell or C#, are there any Adobe API calls I use to do this.  There are several different version that I support and auto update is not an option. I do updates at a specific time of the month. I would like to write a script that would download and install the update for the currently installed version of Adobe Reader (32 or 64 bit) for the version of the OS (32 or 64bit). I can detect the OS version and the Adobe version.  I can download updates but I do not want to hard code anything

    Sabian is correct.
    Most admins download the updates from the ftp site and push via AIP, GPO, SCCM, or some other method whenever it makes sense for them.
    Ben

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • How to read xml file and place it into an internal table...

    hello all,
    can any one help me in - how to read xml data file (placed in application server) and placing the same into an internal table (remove the xml tags or say fetching the xml data without xml tags).

    Hi Murashali,
    use this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • How to read xml file as shown below.

    Hello,
    I am using flash builder 4 and currently working on implementing AIR application.
    I need to read xml file data.
    Normal xml files are easy to read and i am much more aware of it.
    But can any one have idea how to read XML file which is given below.
    <node>
    <key>ID</key>
    <integer>1</integer>
    <key>Name</key>
    <string>Dhwani</string>
    <key>Postno</key>
    <integer>20</integer>
    <key>deskname</key>
    <string>flex</string>
    <key>empid</key>
    <integer>25</integer>
    <key>projectname</key>
    <string>abc</string>
    </node>
    Here i have xml file in form of key value pair. <key> node shows name of the key and after that <integer> or <string> node are the value for that specific key.
    if i select node.key then it shows me all the keys. and from that i cant make out what is the value for key ID.
    Is there any way to take first node and then second. i mean first i ll take value of key and store it into some arraycollection. and then value will be stored.
    Any help is appreciated.. Looking for positive reply.
    Thanks
    Dhwani

    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.

  • How to read XML file and update the data in MS CRM 2011?

    Hi Folks,
    Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.
    Please let me know if any ways of handling it in simple ways.
    Thanks,
    Sri

    HI,
    How to read XML file:
    https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral
    How to work with CRM:
    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
    Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
    OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
    proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    IOrganizationService service = (IOrganizationService)proxy;
    //using "service" you can create, update and retrieve entities.
    More information here about service functions:
    https://msdn.microsoft.com/en-us/library/gg328198.aspx

  • How to validate xml using xsd

    Hi All
    please tell me how to validate xml using xsd
    regards

    Try using this link:
    = http://www.google.nl/search?q=XML+validate+oracle for instance or
    = use the search button on this forum and / or
    = read the FAQ on this (XML DB FAQ
    Thanks Eddie et all, for educating me via http://awads.net/wp/2006/11/14/barts-punishment-for-asking-dumb-questions (don't mind the URL , the info there is really useful)
    The following link on this site is just brilliant: http://www.albinoblacksheep.com/flash/posting.php
    Grz
    Marco
    Message was edited by:
    mgralike

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • I would like to script Adobe Reader updates using vbScript, PowerShell or C#

    I would like to script Adobe Reader updates using vbScript, PowerShell or C#, are there any Adobe API calls I use to do this.  There are several different version that I support and auto update is not an option. I do updates at a specific time of the month. I would like to write a script that would download and install the update for the currently installed version of Adobe Reader (32 or 64 bit) for the version of the OS (32 or 64bit). I can detect the OS version and the Adobe version.  I can download updates but I do not want to hard code anything

    Adobe Reader supports various industry standard tools for enterprise deployment. Note that a redistribition license might be needed if you are installing on behalf of others.
    Here is the forum: http://forums.adobe.com/community/acrobat/acrobat_enterprise_install
    Look under Getting Started for links to the documents you need.

  • How to read XML file kept on NON-SAP server using the Http URL ?

    Dear Experts,
    I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
    All i have with me is the http URL that points to the location of the file.
    I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
    I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
    I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
    Please help me as its an urgent issue .
    Points will be rewarded for sure.
    Please help.
    Thanks in advance,
    Suchita.
    p.s. : the http url to the file location is like -->
    http://SomeServerDomain/SomeDirectory/file.xml

    hi,
    interesting task.
    to request the file by a http call you need to create an if_http_client object.
    More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
    to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
    uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
    now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
    have fun,
    anton

  • How to read xml-stylesheet Processing Instruction from XML using DOM Parser

    Hi,
    I am trying to read an xml that contains xsl stylesheet PI using DOMParser. The parse() method reads the entire contents of the XML except the PI instruction. Below is the XML I am using to read
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet href="../../../lang/en-us/style0/usc_profile.xsl" type="text/xsl"?>
    <Oblix oblang="en-us" xmlns="http://www.oblix.com/" xmlns:oblix="http://www.oblix.com/">
    <ObProfile>
    </ObProfile>
    </Oblix>
    Can anyone let me know if there are any propery settings to be done for the DOM parser before parsing?. If so, what is the property to be set?.
    Thanks in Advance
    Muthu

    A COTS product builds the XML and inserts the respective xsl (xml:stylesheet) file name to be used for transforming the xml. I am trying to interrupt this xml and make some updations on an element and finally send the updated xml to the stream.
    For the above process, I parse the input XML using DOMParser and update the elements (some internal elements). While I view the final XML that would be passed to the stream, I found the <?xml-stylesheet... PI is missing.
    I somehow managed using a temp fix by doing the below. I manually pulled the PI using document.getFirstChild().getNodeValue() and reconstructed the PI and inserted it to the outgoing XML. This needs to be done every time. This might run into problems when more than one PI is used in the XML.
    If the parsed XML could get the PI along with it the above problem could be resolved.
    Is there any property that could be set on the parser (prior to parsing) to resolve the issue?.

  • How to send XML using UTL_HTTP

    I am trying to workout how to send XML data to a webserver using UTL_HTTP but am not getting any reply
    I need to submit the following XML document to a server "http://api.fastsms.co.uk/api/xmlapi.php"  Their instructions are "The XML Document should be posted unencoded, with a UTF-8 character set as parameter 'xml'"
    If I submit the following XML on their test form
    <?xml version="1.0"?>
    <apirequest version="1">
    <user>
      <username>**USER**</username>
      <password>**PASSWORD**</password>
    </user>
    <application>
      <name>Example Application</name>
      <version>1.0</version>
    </application>
    <inboundcheck lastid="10711399"/>
    </apirequest>
    I get an XML response back with the messages in my inbox. 
    This is the code I am trying to use to accomplish the same from PL/SQL : I know a response is coming back as there is header information - just no content.  What am I doing wrong ?
      l_xml VARCHAR2(5000);
      req utl_http.req;
      resp utl_http.resp;
      header_name VARCHAR2(256); -- Response header name
      header_value VARCHAR2(1024); -- Response header value
      response_text VARCHAR2(4000); -- Response body
      l_url VARCHAR2(100);
    BEGIN
      l_xml := 'xml=<?xml version="1.0"?>';
      l_xml := '<apirequest version="1">';
      l_xml := '<user>';
      l_xml := '<username>**USER**</username>';
      l_xml := '<password>**PASSWORD**</password>';
      l_xml := '</user>';
      l_xml := '<application>';
      l_xml := '<name>Example Application</name>';
      l_xml := '<version>1.0</version>';
      l_xml := '</application>';
      l_xml := '<inboundcheck lastid="10711399"/>';
      l_xml := '</apirequest>';
      -- Open HTTP connection
      l_url := 'http://api.fastsms.co.uk/api/xmlapi.php';
      req := utl_http.begin_request(l_url,'POST',utl_http.HTTP_VERSION_1_1);
      -- Set headers for type and length
      utl_http.set_header(req,'Content-Type','application/x-www-form-urlencoded');
      utl_http.set_header(req,'Content-Length',to_char(length(l_xml)));
      -- Write parameter
      utl_http.write_text(req,l_xml);
      -- Read response file
      resp := utl_http.get_response(req);
      -- Print out the response headers
      FOR i IN 1 .. utl_http.get_header_count(resp) LOOP
        utl_http.get_header(resp,i,header_name,header_value);
        logging_pkg.info(header_name || ': ' || header_value);
      END LOOP;
      -- Print out the response body
      BEGIN
        LOOP
          utl_http.read_text(resp,response_text);
          logging_pkg.info(response_text);
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          logging_pkg.info('End of body');
      END;
      -- close http connection
      utl_http.end_response(resp);
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          utl_http.end_response(resp);
    END;
    Cheers,
    Brent

    Hi Billy
    Yikes - how embarassing !  Thanks for pointing out my beginners mistake there.  I've fixed my code - and also implemented the substitutions of parameters like you suggested - I like that approach.
    Unfortunately the end result is no better - the line
    utl_http.read_text(resp,response_text);
    Still returns nothing back
    The headers that are coming back are
    Date: Thu, 04 Jul 2013 08:31:56 GMT
    Server: Apache/2.2.16 (Ubuntu)
    X-Powered-By: PHP/5.3.3-1ubuntu9.3
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Vary: Accept-Encoding
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    Connection: close
    I guess I will need to try chasing it with the fastsms vendor so see if they can check my incoming request and see if there are any glaring problems. I know the xml is correct as I am now logging the xml string just before I send it and when I take that string and put it in their test form it works perfectly - something else in the puzzle is missing. I've had no experience using utl_http before - perhaps it's no possible to read the xml repsonse using this ?
    Anyway, thanks for your help Billy.
    ps - How do you paste your code into your message to get that formatting ?
    Cheers,
    Brent

Maybe you are looking for

  • Can't download Podcasts.

    I am having a problem with the Podcast pages on iTunes via my iPod Touch. I press on 'iTunes' and then 'Podcasts' and can search & scroll through the lists of Podcasts but when I press on one the screen goes black and returns to the iPod Touch Home S

  • More No of GRN with single excise invoice

    Dear Sir we want to do goods receipt for 4 lots with single excise invoice.we have done multible goods receipt with multi credit settings in J1id for that perticular material.we tried to do goods receipt with reference to out bound delivery NO.first

  • Orbd is dead

    when i run 2 transient services, if a method of service A is called, it will call a method of service B. they work fine on visibroke. now I try to port to J2SE 1.4.1_02, only change the routine of initializing the orb(at both server and client sides)

  • Jdeveloper11g:  hover in command button

    i'm developing a web application with ADF Faces and want to disable a button hover effect & i' want to override this method through my css .

  • Please help sdk question

    When the big 2.0 update comes out in june do we need mac computers to have the sdk and enterprise thing or is that just to develop apps you need a mac, or neither