Tranform an xml to string

Hello,
This is maybe a stupid question, but how can I assign an xml content to a string variable ?
for example, I have a variable of type Element containing <test><taga>A</taga><tagb>B</tagb></test> and I would like to assign a String variable with the same content...
In fact, I'm searching for the opposite of parseEscapedXML() function.
Any solution ?
Thanks by advance.

HI ,
In java we have a class XMLUtils in which wehave many usefull methods ,,,,,
chk it once
Patti

Similar Messages

  • How to Parse XML into String in BPEL?

    Hi,
    Can anyone tell me, how can I parse XML into String?
    I am taking input from File Adapter, File adapter is reading that XML.
    Then in assign activity i am using XPath expression(built functions) using XMLParser(),doTranslateToNative() etc.. many functions I have tried but XML is not getting parsed into String Variable.
    Please help me asap.
    Thanks
    Shikha

    Thanks a lot Eric.
    I am trying this, oraext:get-content-as-string('receiveInput_Read_InputVariable','body','/ns3:orders')
    but getting this error
    <bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:get-content-as-string('receiveInput_Read_InputVariable','body','/ns3:orders'). The XPath expression failed to execute; the reason was: internal xpath error. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>

  • XML to string using xslt or java mapping

    Hi Experts,
    I want to put xml into string and i need to change lessthan symbol to "&lt"   and greaterthan symbol to "&gt" , can anyone please help me how to do this??? can you provide code for java mapping or XSLT mapping to achive this.
    SOURCE
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:source_mt xmlns:ns0="urn:ppp:prototype">
       <row>
          <name1>IT</name1>
          <name2>SOLUTIONS</name2>
       </row>
    </ns0:source_mt>
    TARGET
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:target_mt xmlns:ns0="urn:ppp:prototype">
       <row>
          <Body>"&lt"name1"&gt" IT"&lt"/name1"&gt" "&lt"name2"&gt" SOLUTIONS"&lt";/name2"&gt" </Body>
       </row>
    </ns0:target_mt>

    Hi ,
          here is the XSLT code to obtain the desired output
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="/">
    <ns0:target_mt xmlns:ns0="urn:ppp:prototype">
         <xsl:for-each select="//row">
              <row>
                   <Body>
                        <xsl:for-each select="name1">
                                  <xsl:value-of select="concat('*&quot;&lt;&quot;name1&quot;&gt;&quot;*',normalize-space(.),'*&quot;&lt;&quot;/name1&quot;&gt;&quot;*')"></xsl:value-of>
                        </xsl:for-each>     
                        <xsl:for-each select="name2">
                                  <xsl:value-of select="concat('*&quot;&lt;&quot;name2&quot;&gt;&quot;*',normalize-space(.),'*&quot;&lt;&quot;/name2&quot;&gt;&quot;*')"></xsl:value-of>
                        </xsl:for-each>
                   </Body>
              </row>
         </xsl:for-each>
    </ns0:target_mt>      
    </xsl:template>
    </xsl:stylesheet>
    output produced as viewed in browser is
    http://postimage.org/image/1lqbgw8kk/
    Now to obtain exactly the output you posted earlier here is the code
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="/">
    <ns0:target_mt xmlns:ns0="urn:ppp:prototype">
         <xsl:for-each select="//row">
              <row>
                   <Body>
                        <xsl:for-each select="name1">
                                  <xsl:value-of select="concat('*&quot;&amp;lt&quot;name1&quot;&amp;gt&quot;*',normalize-space(.),'*&quot;&amp;lt&quot;/name1&quot;&amp;gt&quot;*')"></xsl:value-of>
                        </xsl:for-each>     
                        <xsl:for-each select="name2">
                                  <xsl:value-of select="concat('*&quot;&amp;lt&quot;name2&quot;&amp;gt&quot;*',normalize-space(.),'*&quot;&amp;lt&quot;/name2&quot;&amp;gt&quot;*')"></xsl:value-of>
                        </xsl:for-each>
                   </Body>
              </row>
         </xsl:for-each>
    </ns0:target_mt>      
    </xsl:template>
    </xsl:stylesheet>
    output you can see from link below
    http://postimage.org/image/2c7bzo478
    Hope this helps.
    Hi,
        Could you please kindly let us know if the solution is working properly as per your requirement?
    regards
    Anupam
    Edited by: anupamsap on Jul 26, 2011 6:29 AM
    Edited by: anupamsap on Jul 26, 2011 4:10 PM

  • Creating a Function module to send XML Byte String

    Hi all,
    I have to create a Function module to get XML byte string.The internal table is dynamic coloums based on how many data selected as a importparameter.from the internal; table data I have to create a XML byte string as a output.Pl help me to proceed further.
    Thanks in Advance.
    Ram

    If i have your question right you need to convert an internal table of unknown type to an xml string then to a byte string.
    data xmlString type string.
    data xmlXString type xstring.
    call transformation id
       source
          table = internalTableYouWantToExport
       result
          xml xmlString.
    export xmlString to data buffer xmlXString.
    xmlString has the xml of the table and xmlXString contains the byte representation of the string.

  • XML Input String too long to Test Web Service in App Server

    We have a Web Service that accepts an XML input string but when we deploy this web service and try to test it through the Application Server it errors out because the input string is too long. Is there any way around this??
    Thanks...

    Update:
    Now I see that there are in fact two error messages. The second one is the one presented above. But the first one says:
    Line: 145
    Char: 97
    Error: Expected ';'
    Code: 0
    My question now is to what file it is referring?? Is it to ProjectAccountingPort.js that is automatically created? THen why is it not properly created??
    Please, please help me with this! The deadline is in a few days...

  • Include xml from string

    If this xml would have been in file I could have used following code:
    <?xml version="1.0" encoding='WINDOWS-1252'?>
    <?xml-stylesheet type="text/xsl" href="t.xsl" ?>
    <page xmlns:xsql="urn:oracle-xsql">
    <xsql:include-xsql href="order_id_seq.xsql" reparse="no" />
    <xsql:include-xml href="order.xml"/>
    </page>
    But i will be getting xml as string .so could you please tell me how can i include a xml which i will be receiving as a string in xsql .
    Thanks

    I would like to correct the version informaiton. We are using SUN JAVA WEBSERVICES DEVELOPERS PACK (JWSDP1.1).
    Nathan

  • Parse XML formatted String

    Hi All,
       I have a string field that is formatted in XML format. What I want to be able to do is pull a specific element from the xml formatted string.
    Example string:
    <customer><name>john</name><id>25636</id></customer>
    I want to retreive just the id number of 25636 from this string.
    I would I go about accomplishing this?
    Thank you in advance,

    I fixed it on my own.
    Here' s my answer for others that may need it:
    if(instr({field.xmlstring},'</id>')  - instr({field.xmlstring},'<id>') = 7)then
       mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,3)
    else if(instr({field.xmlstring},'</id>')  - instr({field.xmlstring},'<id>') = 8)then
       mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,4)
    else if(instr({field.xmlstring},'</id>')  - instr({field.xmlstring},'<id>') = 9)then
       mid(totext({field.xmlstring}),instr({field.xmlstring},'<id>')+4,5)
    I use the conditions to cover all possible lengths of the id number.

  • Receive xml as string from OSB and pass it to Bpel

    I was given xml and DTD by our external partners. I need to receive this xml, parse this and insert some of the
    values of the elements into DB.
    Question1:
    Since I don't have WSDL, can I receive xml in string and pass it on to OSB BS which calls Bpel process?
         If yes, how and can I get any example?
    How do I set up osb bs service to talk to bpel?
    I have installed oracle soa suite 10g with patch set 4. This runs with Oracle AS. I have my Bea weblogic 10.3 with OSB installed.
    Both the servers are running seperately.

    If I use
    string to xml --- fn-bea:inlinedXML()
    How do I extract a value of an element? When I log the xml that got extracted from a string, I only see the values of elements with no element names:
    eg: if incoming string format of xml is:
    <Customer>
    <name>aaa</name>
    <address>bb</address>
    </Customer>
    After fn-bea:inlinedXML($body)
    I see:
    aaa
    bbb
    in the log, but with no element names

  • Passing xml as string to xmlPanel function

    hello Genius,
    I am using XML2UI feature of Extending Flash. I want to pass
    XML through string in place of xml file in xmlPanel function.
    is there any way to avoid creating 20 xml files and
    distributing them as my planned extension have 20 ui's.
    thanks in advance.

    Hai Shyam,
    I have tried to do as u have mentioned but still its not taking it as a paramater.
    i mean the API say
    parse
    public void parse(InputSource input) throws IOException,
    SAXExceptionParse an XML document.
    The application can use this method to instruct the XML reader to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).
    Is is any way to convert string to (char stream or byte stream).
    Thanks a lot
    Pooja.

  • MapViewer API: addMapCacheTheme creates unexpected XML request string

    Hi,
    I try to get a map with map cache theme on it. But MapViewer class generates an xml request string in which an unexpected wfs theme
    exists. So I'm unable to add a map cache theme since the wfs theme causes a problem and i only get an image painted with background
    color...
    my java code is as follows:
                   String viewerUrl = "http://localhost:8888/mapviewer/omserver";
                   String dataSource = "ADATASOURCE";
                   String mapCache= "AMAPCACHE";
                   MapViewer viewer = new MapViewer(viewerUrl);
                   viewer.setDataSourceName(dataSource);
                   viewer.setImageFormat(MapViewer.FORMAT_PNG_URL);
                   viewer.setMapRequestSRID(8307);
                   viewer.setAntiAliasing(false);
                   viewer.setMapTitle(null);
                   viewer.setBackgroundColor(new Color(0xA6CAF0));
                   viewer.setBackgroundImageURL(null);
                   viewer.setDeviceSize(new Dimension(480, 480));
                   //viewer.setBaseMapName(baseMap);
                   viewer.addMapCacheTheme(mapCache, dataSource, mapCache, true);
                   viewer.setCenter(29, 41);
                   viewer.setSize(1);
                   //For debugging issues
                   String req = viewer.getMapRequestString();
                   viewer.run();
    value for req variable is:
    <?xml version="1.0" standalone="yes"?>
    <map_request
    datasource="ADATASOURCE"
    srid="8307"
    width="480"
    height="480"
    bgcolor="#a6caf0"
    antialiase="false"
    format="PNG_URL"
    >
    <center size="1.0">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates>29.0,41.0</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name="AMAPCACHE" datasource="ADATASOURCE">
    <map_cache_theme map_cache_name="AMAPCACHE" snap_to_cache_scale="true"/> </theme> <theme name="AMAPCACHE" >
    <wfs_feature_request
    datasource="ADATASOURCE"
    />
    </theme>
    </themes>
    </map_request>
    The first theme is the one that i wanted to add.
    The second one (bold) is the one that causes trouble. I don't know where it comes from.
    This problem occured when i started to use mvclient.jar that came with patch 6453515 which changed MapViewer version from
    Ver10131_B06102 to Ver11_B07100.
    The old mvclient.jar (came with MapViewer Ver10131_B06102) produces the following xml request string:
    <?xml version="1.0" standalone="yes"?>
    <map_request
    datasource="ADATASOURCE"
    srid="8307"
    width="480"
    height="480"
    bgcolor="#a6caf0"
    antialiase="false"
    format="PNG_URL"
    >
    <center size="1.0">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates>29.0,41.0</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name="AMAPCACHE" datasource="ADATASOURCE">
    <map_cache_theme map_cache_name="AMAPCACHE" snap_to_cache_scale="true"/> </theme> </themes>
    </map_request>
    What might cause this problem?
    OS: Windows XP Pro SP2
    IDE: JDeveloper 10.1.3.1.0
    Thanks in advance,
    Cihan

    Hi Cihan,
    it is confirmed to be a bug with this client library and it will be fixed. Thanks.
    Joao

  • Need help in creating XSD for a WSDL file to tranform given XML

    Hi,
    Please let me knoe if this is the right forum to post the query below:
    We are trying to transform a XML output from a webservice using a XSD file. But we are facing problem as the XML output has some namespace issue and schema due to which transformation is not working fine. I am pasting the files below:
    WSDL file used is
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/Projectix20/SOAPAccess" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/Projectix20/SOAPAccess" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/Projectix20/SOAPAccess">
    <s:element name="ExecuteSQLToXML">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="SQL" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="ExecuteSQLToXMLResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="ExecuteSQLToXMLResult">
    <s:complexType mixed="true">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="NewDataSet">
    <s:complexType>
    <s:choice>
    <s:element minOccurs="0" maxOccurs="unbounded" name="Table1">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="10" name="FName" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:choice>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetDataTablePage">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="SQL" type="s:string" />
    <s:element minOccurs="1" maxOccurs="1" name="PageNumber" type="s:int" />
    <s:element minOccurs="1" maxOccurs="1" name="RecordsPerPage" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetDataTablePageResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetDataTablePageResult">
    <s:complexType mixed="true">
    <s:sequence>
    <s:any />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetRecordCount">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="SQL" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetRecordCountResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="GetRecordCountResult" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="UploadCanAtt">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="CanID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="Filename" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="bytesData" type="s:base64Binary" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="UploadCanAttResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="UploadCanAttResult" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="DownloadCanAtt">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="CanAttID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="DownloadCanAttResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="DownloadCanAttResult" type="s:base64Binary" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="ExecuteSQLToXMLSoapIn">
    <wsdl:part name="parameters" element="tns:ExecuteSQLToXML" />
    </wsdl:message>
    <wsdl:message name="ExecuteSQLToXMLSoapOut">
    <wsdl:part name="parameters" element="tns:ExecuteSQLToXMLResponse" />
    </wsdl:message>
    <wsdl:message name="GetDataTablePageSoapIn">
    <wsdl:part name="parameters" element="tns:GetDataTablePage" />
    </wsdl:message>
    <wsdl:message name="GetDataTablePageSoapOut">
    <wsdl:part name="parameters" element="tns:GetDataTablePageResponse" />
    </wsdl:message>
    <wsdl:message name="GetRecordCountSoapIn">
    <wsdl:part name="parameters" element="tns:GetRecordCount" />
    </wsdl:message>
    <wsdl:message name="GetRecordCountSoapOut">
    <wsdl:part name="parameters" element="tns:GetRecordCountResponse" />
    </wsdl:message>
    <wsdl:message name="UploadCanAttSoapIn">
    <wsdl:part name="parameters" element="tns:UploadCanAtt" />
    </wsdl:message>
    <wsdl:message name="UploadCanAttSoapOut">
    <wsdl:part name="parameters" element="tns:UploadCanAttResponse" />
    </wsdl:message>
    <wsdl:message name="DownloadCanAttSoapIn">
    <wsdl:part name="parameters" element="tns:DownloadCanAtt" />
    </wsdl:message>
    <wsdl:message name="DownloadCanAttSoapOut">
    <wsdl:part name="parameters" element="tns:DownloadCanAttResponse" />
    </wsdl:message>
    <wsdl:portType name="SOAPAccessSoap">
    <wsdl:operation name="ExecuteSQLToXML">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Executes a SQL statement and returns a generic XML document with results from SQL statement.</documentation>
    <wsdl:input message="tns:ExecuteSQLToXMLSoapIn" />
    <wsdl:output message="tns:ExecuteSQLToXMLSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetDataTablePage">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Executes a SQL statement and returns a generic XML document with results from SQL statement.</documentation>
    <wsdl:input message="tns:GetDataTablePageSoapIn" />
    <wsdl:output message="tns:GetDataTablePageSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetRecordCount">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Executes a SQL statement and returns a generic XML document with results from SQL statement.</documentation>
    <wsdl:input message="tns:GetRecordCountSoapIn" />
    <wsdl:output message="tns:GetRecordCountSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="UploadCanAtt">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Uploads a text or binary attachment file for a Candidate record.</documentation>
    <wsdl:input message="tns:UploadCanAttSoapIn" />
    <wsdl:output message="tns:UploadCanAttSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="DownloadCanAtt">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Uploads a text or binary attachment file for a Candidate record.</documentation>
    <wsdl:input message="tns:DownloadCanAttSoapIn" />
    <wsdl:output message="tns:DownloadCanAttSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SOAPAccessSoap" type="tns:SOAPAccessSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="ExecuteSQLToXML">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/ExecuteSQLToXML" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetDataTablePage">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/GetDataTablePage" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetRecordCount">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/GetRecordCount" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UploadCanAtt">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/UploadCanAtt" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DownloadCanAtt">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/DownloadCanAtt" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SOAPAccess">
    <wsdl:port name="SOAPAccessSoap" binding="tns:SOAPAccessSoap">
    <soap:address location="http://sales.projectix.com:81/customer/SOAPAccess.asmx" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    XSD file used for transformation is:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
    <xs:element name="ExecuteSQLToXMLResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ExecuteSQLToXMLResult"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="parameters">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ExecuteSQLToXMLResponse"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="ExecuteSQLToXMLResult">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="NewDataSet"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="FNAME" type="xs:string"/>
    <xs:element name="Table1">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="FNAME"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="NewDataSet">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="unbounded" ref="Table1"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    XML Output from webservice call that we are trying to tranform using above XSD is:
    <parameters >
    <ExecuteSQLToXMLResponse xmlns = "http://tempuri.org/Projectix20/SOAPAccess" >
    <ExecuteSQLToXMLResult >
    <NewDataSet xmlns = "" >
    <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema" xmlns:msdata = "urn:schemas-microsoft-com:xml-msdata" >
    <xs:element name = "NewDataSet" msdata:IsDataSet = "true" >
    <xs:complexType >
    <xs:choice maxOccurs = "unbounded" >
    <xs:element name = "Table1" >
    <xs:complexType >
    <xs:sequence >
    <xs:element name = "FNAME" type = "xs:string" minOccurs = "0" ></xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <Table1 >
    <FNAME >
    JOHN
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    John
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    John
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    JOHN
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    John
    </FNAME>
    </Table1>
    </NewDataSet>
    </ExecuteSQLToXMLResult>
    </ExecuteSQLToXMLResponse>
    </parameters>
    I am not sure what we are missing in XSD file that the XML output is not getting transformed correctly...although we tried transforming the XML output by removing some information in XML output above and it was getting trasformed properly..
    We remove
    1. xmlns = "http://tempuri.org/Projectix20/SOAPAccess" from <ExecuteSQLToXMLResponse xmlns = "http://tempuri.org/Projectix20/SOAPAccess" >
    2. xmlns = "" from <NewDataSet xmlns = "" >
    3 remove <parameters > and </parameters > tags from output and the XML Output is getting tranformed correctly.
    Please let us know if we can transform the XML Output without requiring these removals.
    Thanks,
    Pawan

    Could you clarify some things? You are saying you are trying to transform the xml output of a webservice with an xsd, but an xsd is a schema that describes the allowed format of a xml file. If you want to transform xml from one format to an other (from one xsd to an other) you have to use a xsl file. You can make and test this with JDeveloper. Are you calling the webservice from esb or bpel?
    Kind Regards,
    Andre

  • How to find a substring in XML-lookslike string?

    Hi,
    I have a question and wondering if anyone can help me with it.
    We have Java tool that does a string replacement inside another string (that is actually an XML request). It works fine when searching for a simple substring (that exists within 1 line of the XML string).
    But when I'm trying to find and replace a substring that covers more then 1 line of XML request - it does not work. And I'm not sure what is wrong or (more importantly) how to make it work.
    There is no return or new-line chars seen in the XML request.
    To make it more clear - here is what I have and trying to do:
    <a>
    <a>
    <b>
    <c>
    <d> </d>
    <c>
    <c>
    </c>
    </c>
    </c>
    </b>
    </a>
    </a>
    If I'll seach for either <c> OR </c> OR <d> </d> it all works fine ... BUT if Itry to find
    </c>
    </b>
    which will be copied directly from the XML request and past into field - thus it will look like this (horisontal line instead of vertical) </c> </b> - it does not work

    qavlad wrote:
    But when I'm trying to find and replace a substring that covers more then 1 line of XML request - it does not work. First statement - "more than 1 line"
    There is no return or new-line chars seen in the XML request.Second statement.
    There is no way that I can understand what you meant in your first statement in terms of your second.
    If there are no end of line characters at all then there is only one line. Period.
    If there are end of line characters, of any kind, then that would really suggest the source of the problem.

  • Urgent Help required! - Storing the XML as String instead as a file

    Hi,
    I need urgent help on this.
    I have an XML file. I have used org.w3c.dom to build dom and manipulate the XML file.
    I have updated the values for some of the nodes and I have deleted some of the unwanted nodes.
    I am able to save the output of the DOM as another XML file using
    either transform class or XMLSerializer with OutputFormatter class.
    But my requirement is to save the output of the DOM into a String instead of a file.
    When I save it in String, I need to have the following XML decalration and DOCTYPE declration also with it.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE Test SYSTEM "Test.dtd">
    Can anyone pls help me in this??
    Thanks in Advance. Expecting some inpputs pls....!
    Regards,
    Gayathri.

    hi,
    i think this is what u want
        public static String getXmlString(Document d) {
          StringWriter strResponse = null;
          try {
             OutputFormat format  = new OutputFormat(d);
             strResponse = new StringWriter();
             XMLSerializer serial = new XMLSerializer( strResponse, format );
             serial.asDOMSerializer();
             serial.serialize(d.getDocumentElement());
          catch (Exception e) {
            System.out.println(e.toString());
          return strResponse.toString();
    }HTH
    vasanth-ct

  • How convert an xml to string for a textflow

    Hi
    usually I use fields type String to feed the textFlows.
    now for visual convenience, I would like to store them in file formatted XML, and the thing succeeds well, but when I want use them I have problems, because the formatting XML creates line spacings that I don't want,
    for example:
    <TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" lineBreak="toFit" paddingBottom="4" paddingLeft="4" paddingRight="4" paddingTop="4" paragraphSpaceAfter="15" paragraphSpaceBefore="0" verticalAlign="top" id="flow" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008">
      <linkActiveFormat>
        <TextLayoutFormat color="#cc00cc" fontWeight="bold" textDecoration="underline"/>
      </linkActiveFormat>
      <linkHoverFormat>
        <TextLayoutFormat color="#cc0000" fontWeight="bold" textDecoration="underline"/>
      </linkHoverFormat>
      <linkNormalFormat>
        <TextLayoutFormat color="#000099" fontWeight="bold" textDecoration="none"/>
      </linkNormalFormat>
      <p color="#990099" fontSize="15">
        <span>Gestione dei testi con TLF e Testo classico</span>
      </p>
      <p color="#666555" fontFamily="Arial" fontSize="14">
        <span>Le novità introdotte con l'ultima release di Flash CS5 sono molteplici, una di queste novità riguarda i campi di testo.</span>
      </p>
      <p color="#990099" fontSize="15">
        <span>Cosa c'è da sapere sul Text Layout Framework (TLF)?</span>
        <img id="1|emot|0" height="18" width="18" source="[object Bitmap]"/>
        <span></span>
      </p>
      <p color="#666555" fontFamily="Arial" fontSize="14">
        <span>Che rispetto al Testo Classico,</span>
      </p>
    </TextFlow>
    produce me:
    init--------------------------------------------------------------
        Gestione dei testi con TLF e Testo classico
        Le novità introdotte con l'ultima release di Flash CS5 sono molteplici, una di queste novità riguarda i campi di testo.
        Cosa c'è da sapere sul Text Layout Framework (TLF)?
        Che rispetto al Testo Classico,
    --------------------------------------------------------------------- end
    instead of:
    init--------------------------------------------------------------
    Gestione dei testi con TLF e Testo classico
    Le novità introdotte con l'ultima release di Flash CS5 sono molteplici, una di queste novità riguarda i campi di testo.
    Cosa c'è da sapere sul Text Layout Framework (TLF)?
    Che rispetto al Testo Classico,
    --------------------------------------------------------------------- end
    as I will want.
    Now i see that with spark.utils i can use importFromXML to convert in a textFlow with collapse the line in excess, but unfortunately the class spark is not visible in Flash/as3.
    can you help me?
    thanks in advance
    jeanPaul

    hi
    I tested with this code:
    package 
      import flash.net.URLRequest;
      import flash.net.URLLoader;
      import flash.display.Sprite;
      import flash.events.*;
      import flashx.textLayout.elements.*;
      import flashx.textLayout.conversion.*;
      import flashx.textLayout.formats.TextLayoutFormat;
      public class importer extends Sprite
       private var urlRequest:URLRequest;
       private var urlLoader:URLLoader;
       public function importer()
         urlRequest = new URLRequest('newPRV_scritto.xml');
         urlLoader = new URLLoader();
         urlLoader.addEventListener(Event.COMPLETE, caricato);
         urlLoader.addEventListener(IOErrorEvent.IO_ERROR, erroreCaric);
         urlLoader.load(urlRequest);
       private function erroreCaric(e:IOErrorEvent):void
        { trace("error: file not found"); }
      private function caricato(e:Event):void
        var markup:String = e.target.data;
        var config:Configuration = new Configuration();
        var format:TextLayoutFormat = new TextLayoutFormat(config.textFlowInitialFormat);
        format.whiteSpaceCollapse = "collapse";
        config.textFlowInitialFormat = format;
        var imp:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT, config);
        imp.throwOnError = false;
        var flow:TextFlow = new TextFlow;
        flow = imp.importToFlow(markup);
        if (flow==null)
          trace('----------not imported---------');
          else
          trace( TextConverter.export(flow, TextConverter.TEXT_LAYOUT_FORMAT,ConversionType.STRING_TYPE) as String);
    and the result is the trace:  '----------not imported---------'
    what you say of it?

  • Xerces - Parse XML from String

    I am trying to parse an xml string using Xerces.
    I have the following code:
    String xml = <segments meters="8643" seconds="538" distance="5.4 mi" time="8 mins"><segment id="seg0"  pointIndex="0" meters="122" seconds="11"  distance="0.1 mi"  time="11 secs">Head  <b>southwest</b> from <b>B Ave NE</b>
    </segment>
    <segment id="seg1" pointIndex="2" meters="239" seconds="22" distance="0.1 mi" time="21 secs">Turn <b>left</b> at <b>19th St NE</b></segment>
    <segment id="seg2" pointIndex="5" meters="2985" seconds="192" distance="1.9 mi" time="3 mins">Turn <b>right</b> at <b>1st Ave NE</b></segment>
    <segment id="seg3" pointIndex="43" meters="3280" seconds="211" distance="2.0 mi" time="3 mins">Continue on <b>1st Ave SW/1st Ave NW</b></segment>
    <segment id="seg4" pointIndex="96" meters="158" seconds="10" distance="0.1 mi" time="10 secs">Bear <b>right</b> at <b>US-151-BR S</b></segment>
    <segment id="seg5" pointIndex="102" meters="1859" seconds="93" distance="1.2 mi" time="1 min">Turn <b>right</b> at <b>16th Ave SW</b></segment>;
    XMLReader reader = new SAXParser();
    reader.setContentHandler(new Handler());
    reader.parse(xml);I am getting the followoing error:
    org.xml.sax.SAXParseException: File "<segments meters="8643" seconds="538" distance="5.4 mi" time="8 mins"><segment id="seg0" pointIndex="0" meters="122" seconds="11" distance="0.1 mi" time="11 secs">Head  <b>southwest</b> from <b>B Ave NE</b></segment><segment id="seg1" pointIndex="2" meters="239" seconds="22" distance="0.1 mi" time="21 secs">Turn <b>left</b> at <b>19th St NE</b></segment><segment id="seg2" pointIndex="5" meters="2985" seconds="192" distance="1.9 mi" time="3 mins">Turn <b>right</b> at <b>1st Ave NE</b></segment><segment id="seg3" pointIndex="43" meters="3280" seconds="211" distance="2.0 mi" time="3 mins">Continue on <b>1st Ave SW/1st Ave NW</b></segment><segment id="seg4" pointIndex="96" meters="158" seconds="10" distance="0.1 mi" time="10 secs">Bear <b>right</b> at <b>US-151-BR S</b></segment><segment id="seg5" pointIndex="102" meters="1859" seconds="93" distance="1.2 mi" time="1 min">Turn <b>right</b> at <b>16th Ave SW</b></segment></segments>" not found.
         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1219)
         at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:501)
         at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1139)
         at com.shiftyeyes.xmlTest.main(xmlTest.java:34)
    Exception in thread "main" anyone know how I can fix this? Thanks!!

    reader.parse(new InputSource(new StringReader(xml)));

Maybe you are looking for

  • ALV to PDF output format

    Hi Experts, I am using following code to convert Alv report to pdf format..........can i change the number of output lines shown in the pdf DATA :        WA_TSTC              TYPE TSTC,        WA_TSTCP             TYPE TSTCP,        SM30_PARA        

  • How can I download previous iTunes purchases from older apple id after my Mac is associated with my current one?

    I have 4 MacBooks running MtnLion, iPad3, iPhones 2,3gs,4,and 4s,Time Capsule, and Apple TV.... I have 2 Apple IDs [email protected], and [email protected] Almost all of my media is associated with gmail Apple ID. I want to retrieve my previous purch

  • Building a desktop app - use AIR or not?

    Hello, I'm guessing that the keyword "desktop" would make you recommend I use Adobe AIR if I'm building with Flex.  Basically, we're building a desktop application that will occasionally sync with the server where a separate but related application r

  • 9.1 won't boot from FireWire drive on an iMac g3 and iBook g3.

    hi, I have a very old powermac 6500/250, I just wiped it and installed mac os 9.1 it boots fine in the powermac, but when in the FireWire/USB encloser I get the floppy with a ? Mark. the encloser boots with mac os x. Is mac os 9 not bootable with Fir

  • InDesign CS6 not automatically updating links

    In previous verisons of InDesign, if I select a linked file, then click "edit link" from the links panel, the link will open up in Photoshop or Illustrator or whatever program, and once I edit, save, and close the file, when I switch back to InDesign