Problem in producing some xml strings

Dear all,
I got a problem in producing some xml string. I use the DocumentBuilderFactory and DocumentBuilder to build a xml document. Instead of saving to a file, I need to make it into a string then return it to the caller. I have tried to use the Transformer but the string returned contains the <?xml version=..../> line which I don't want it. What can I do?

What you want to do is associate a stylesheet with the transformer instance you are using to place the DOM into string. The stylesheet with the appropriate instructions are get rid of the <?xml version=..>. You want to produce a stylesheet which has:
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:copy-of select="node()"/>
</xsl:template>
<xsl:output> controls the serialisation of the xml document to the output source which in this case is a string. The <xsl:template> is required. It will copy the entire xml document to the output source. Without it the default templates are used, and the xml markup will not be included in the output source.
Hope this helps.

Similar Messages

  • Problem in parsing a xml string using dom parser

    i want to parse a Xml String using a Dom parser......the parse function in dom parser takes only input stream as argument.......so i made the code as
    InputStream inputstream = new StringBufferInputStream(XmlData) ;
    InputSource inputSource = new InputSource(inputstream );
    but saxexception is coming and also warning called
    "java.io.StringBufferInputStream in java.io has been deprecated"
    please help me.........

    i want to parse a Xml String using a Dom
    parser......the parse function in dom parser takes
    only input stream as argument.......This is not true of the DOM parser in Java 1.4. So you might want to get rid of your old parser and replace it by something more current. Or perhaps you are using 1.4 and you just didn't read all of the API docs.

  • StringReader problem in CLDC to parse String XML

    hello..
    i'm newbie in java mobile...
    i have problem to parse my XML string to my web service..
    i had develop client mobile to access my web service with KSOAP2, and in the first time, i devlop in CDC not CLDC, so there is no problem when i use some of java.io, i use java.io.StringReader to parse my string XML...
    the code i use in CDC when using java.io.StringReader is like this :
    XmlPullParser parser = new KXmlParser();
    String a = "<n1:ClientHeader xmlns:n1=\"http://www.myweb.web.id\">" +
                            "<n1:ClientUser>" + client.user + "</n1:ClientUser>" +
                            "<n1:ClientIP>" + client.ip + "</n1:ClientIP>" +
                    "</n1:ClientHeader >";     
    parser.setInput(new StringReader(a));
    Document doc = new Document();
    doc.parse(parser);
    Element headSoap = new Element();        
    headSoap = doc.getRootElement();      then, i use this code in CLDC, the error was found, becouse java.io.StringReader in CLDC not found.
    so, my question is ...
    any solution to solve my problem when i have string which the value is in XML, like in my code before, and i want to parse it to kxml2.kdom.Element, how..?
    please help me...

    hello..
    i'm newbie in java mobile...
    i have problem to parse my XML string to my web service..
    i had develop client mobile to access my web service with KSOAP2, and in the first time, i devlop in CDC not CLDC, so there is no problem when i use some of java.io, i use java.io.StringReader to parse my string XML...
    the code i use in CDC when using java.io.StringReader is like this :
    XmlPullParser parser = new KXmlParser();
    String a = "<n1:ClientHeader xmlns:n1=\"http://www.myweb.web.id\">" +
                            "<n1:ClientUser>" + client.user + "</n1:ClientUser>" +
                            "<n1:ClientIP>" + client.ip + "</n1:ClientIP>" +
                    "</n1:ClientHeader >";     
    parser.setInput(new StringReader(a));
    Document doc = new Document();
    doc.parse(parser);
    Element headSoap = new Element();        
    headSoap = doc.getRootElement();      then, i use this code in CLDC, the error was found, becouse java.io.StringReader in CLDC not found.
    so, my question is ...
    any solution to solve my problem when i have string which the value is in XML, like in my code before, and i want to parse it to kxml2.kdom.Element, how..?
    please help me...

  • Problem in Casting the encoded string to XML

    Hi all,
    From dotnet code i have encoded the XML as string and passed this value as XML attribute value in below.
    Am not sure if we can have XML as attribute value inside another XML.hence i did with below approach.
    Now i have special character '<' in that please refer yellow highlighted.this was having problem in casting to XML.
    Kindly assist me.
    Thanks in advance. 
    DECLARE @XML
    XML                       
    SET @XML
    = '<Utility><Actions><Action Category="ExecuteSp" SettingName="GetDMS" ComponentId="19">
    <Parameters Param="SourceXML" Value="&amp;lt;NewDataSet&amp;gt;&amp;lt;Table1&amp;gt;&amp;lt;DocumentName&amp;gt;US OB
    &amp;amp;lt; 14 Weeks /Transvaginal&amp;lt;/DocumentName&amp;gt;&amp;lt;/Table1&amp;gt;&amp;lt;/NewDataSet&amp;gt;" /></Action></Actions></Utility>'            
    Declare @SourceDMSXML
    as varchar(max)                          
    SELECT 
    @SourceDMSXML = @XML.value('(/Utility/Actions/Action/Parameters[@Param = "SourceXML"]/@Value)[1]','varchar(max)')               
    SET @SourceDMSXML
    = Replace(@SourceDMSXML
    , '&amp;lt;',
    '<');                   
    SET @SourceDMSXML
    = Replace(@SourceDMSXML
    , '&amp;gt;',
    '>');      
    SET @SourceDMSXML
    = Replace(@SourceDMSXML
    , '&lt;',
    '<');                   
    SET @SourceDMSXML
    = Replace(@SourceDMSXML
    , '&gt;',
    '>'); 
    DECLARE @SourceXML
    XML                          
    SET @SourceXML
    = CAST(@SourceDMSXML
    AS XML)    
    select  
    @SourceXML  

    How are you generating this value? You need to use TYPE directive for avoiding this
    see similar example here
    http://visakhm.blogspot.in/2014/01/rowset-concatenation-with-special.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Performance problem submitting big XML string parameter to the web service

    We deployed a web service on the OC4J via oracle.j2ee.ws.StatelessJavaRpcWebService . This web service takes one string as a parameter. The string contains XML. Evrything works great UNLESS input XML string reaches 5Mb in size. When it happens OC4J does something with it for about 10 minutes (yes, minutes) before it calls the web service method. At this time java.exe consumes 100% of CPU.
    WE tried to increase JVM heap size, stack size, etc, - no effect.
    Please, help!
    Thank you in advance,
    Vlad.

    Hi Sheldon,
    What i feel is that it's not been handled in your webservice if the parameter is null or "" <blank> space
    i just you to take care in webservice that if the parameter is null or "" pass the parameter null to the stored proc
    Regards
    Pavan

  • Producing canonical XML

    Hi,
    I need to convert an XML document to its canonical form according to W3C standards. I tried to use http://xom.nu/ but it didn't work for some reason. Does anyone know other utilities that may do the work?
    Thanks,
    Daniel

    Thanks for the reply. Yeah, I did post on Javaranch too, trying to catch the widest cross section of people in the hope of an answer to this problem.
    You have a very good point about the attribute order. I must admit I hadn't thought of that. You are right, one of the things the canonical form requires is for the attributes to be in alphabetical order.
    I still find it hard to believe that there isn't a Sun library that does this. There is a javax package to support the other two steps in signing a message (MessageDigest and Signature) so it seems odd that there isn't one for this. Unless I'm simply missing it.
    I'm not entirely sure what you mean by an XML serializer, sorry I'm not that experienced in the whole XML, XSLT, etc firld yet. Is it the sort of thing that is Java uses when a Document is produced from a string containing XML?
    Thanks again for your help,
    Adrian

  • Messy code problem while translating XString to String in OfficeControl

    Hi Expert,
        I have messy code problem while translating XString to String in XML-Format Word Doc in OfficeControl.
    I upload an XML-Format template Word Doc to server as a MIME Object.
    When OfficeControl is started in Web Dynpro, OfficeControl automatically open the XML-Format template.
    For the first time, I get the XString-type Context attribute bind to the content of the Word Doc,
    then translate it to string, I got the XML-format content, it's great!
    However, after the first time, when I input any new contents in MS Word in Web Dynpro,
    no matter I execute "Ctrl + S" or click the "savedocument" button,
    when I translate the XString Context attribute to String, I got messy code. (but the first time, it is good plain text)
    I use the function module: ECATT_CONV_XSTRING_TO_STRING (good for first time, dump after first time),
    SCMS_XSTRING_TO_BINARY, SCMS_BINARY_TO_STRING (good for first time, messy code after first time).
    My Demo source code is in: (system) SMV --> (local object) zhaode --> (Dynpro Component) ztest_office_control
    core source code is as:
    clear itab.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    BUFFER = lv_datas
    IMPORTING
    OUTPUT_LENGTH = lv_length
    TABLES
    binary_tab = itab.
    CALL FUNCTION 'SCMS_BINARY_TO_STRING'
    EXPORTING
    input_length = lv_length
    mimetype = 'text/plain; charset=utf-8'
    IMPORTING
    text_buffer = lv_datas_string
    output_length = lv_data_len
    TABLES
    binary_tab = itab.
    Can you give me some advice?
    Many thanks in advance.
    Best Regards,

    You have already posted this same question several times (and some very similiar questions) within the forum.  Please do NOT multiple post your questions. This is against the forum rules of engagement. SAP employee or not, you will find yourself banned from the forums if you don't follow the rules.

  • How to create XML string for an object matching the result of a marshal?

    I'm trying to create a XML string representation of an object which exactly matches the XML which results from marshalling the object into a request. I'm almost there except that the XML string I come up with is missing the attribute "standalone=\"yes\"" in the topmost xml element, and this attribute is present in the marshalled XML. I'm using the XML string to create a payload signature which must match exactly with the XML payload of the request, so the two XML representations of the object really do need to be identical.
    Here's what I'm doing to create the XML from the object:
       private String myObjectToXmlString (final MyObject myObject)
           throws Exception {
                 try {
               DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
               Document document = documentBuilder.newDocument();
               myObjectMarshaller.marshal(myObject, document);
               Source source = new DOMSource(document);
               StringWriter stringWriter = new StringWriter();
               Result result = new StreamResult(stringWriter);
               TransformerFactory factory = TransformerFactory.newInstance();
               Transformer transformer = factory.newTransformer();
               transformer.transform(source, result);
               return stringWriter.getBuffer().toString();
           } catch (Exception ex) {
               throw new Exception("Unable to convert a MyObject object to an XML String -- " + ex.toString(), ex);
       }The XML which is produced looks like this:
    <?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <ns2:myObject xmlns:ns2=\"http://sunconnection.sun.com/xml\">
       <myObjectId>0</myObjectId>
       <objectType>1</objectType>
       <description>Test Object</description>
    </ns2:myObject>The payload object is marshalled to the request like so:
        // marshall the MyObject to the output stream
       OutputStream outputStream = myHttpUrlConnection.getOutputStream();
       myObjectMarshaller.marshal(myObject, outputStream);
       outputStream.flush();
       outputStream.close();When I view the XML payload of the request it looks like this:
    <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
    <ns2:myObject xmlns:ns2=\"http://sunconnection.sun.com/xml\">
       <myObjectId>0</myObjectId>
       <objectType>1</objectType>
       <description>Test Object</description>
    </ns2:myObject>As you can see the two XML representations of the object are identical except for the standalone attribute in the xml element.
    It'd be a hack to make the assumption that the standalone attribute will always be there in the marshalled object and to just hard code it into the XML string returned by my object to XML method. Since I'm using the same Marshaller to create the XML string as I am to perform the marshalling to the request I assume that there's some way to make it give the same XML in both cases, and that I'm doing something wrong in my method which converts the object to an XML string. If anyone can see where I'm going wrong in that method (myObjectToXmlString() above), or can suggest a better way of doing this, then I'll certainly appreciate the insight.
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It turns out that I was taking the wrong approach in my object to XML string method. A cleaner/better way to do it, which gives the correct result, is this:
        private String myObjectToXmlString (final MyObject myObject)
            throws Exception {
            try {
                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                myObjectMarshaller.marshal(myObject, stream);
                return stream.toString();
            } catch (Exception ex) {
                throw new Exception("Unable to convert a MyObject object to an XML String -- " + ex.toString(), ex);
        }--James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with encoding of xml document

    while parsing an xml document with SAX parser, i found that encoding of the xml document received as input stream is "ISO-8859-1" . After parsing certain fields has to be stored in the mysql table where table character set is "utf8" . Now what i found that ceratin characters in the original XML document are stored as question mark (?) in the database.
    1. I am using mysql 4.1.7 with system variable character_set_database as "utf8". So all my tables have charset as "utf8".
    2. I am parsing some xml file as inputsream using SAX parser api (org.apache.xerces.parsers.SAXParser ) with encoding "iso-8859-1". After parsing certain fields have to be stored in mysql database.
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - � and the problem is that words like can�t are shown as can?t by database.
    4. I notiicied that parsing is going on well and character code is 146 while parsing. But when i reterive it from the database using jdbc it shows character code as 63.
    5. I am using jdbc to prepared statement to insert parsed xml in the database. It seems that while inserting some problem occurs what is this i don't know.
    6. I tried to convert iso-8859-1 to utf-8 before storing into database, by using
    utfString = new String(isoString.getBytes("ISO-8859-1"),"UTF-8");
    But still when i retreive it from the databse it shows caharcter code as 63.
    7. I also tried to retrieve it using , description = new String(rs.getBytes(1),"UTF-8");
    But it also shows that description contains character with code 63 instead of 146 and it is also showing can�t as can?t
    help me out where is the problem in parsing or while storing and retreiving from database. Sorry for any spelling mistakes if any.

    duggal.ashish wrote:
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - &#146; and the problem is that words like can&#146;t are shown as can?t by database.http://en.wikipedia.org/wiki/ISO8859-1
    Scroll down in that page and you'll see that the character code 146 -- which would be 92 in hexadecimal -- is in the "unused" area of ISO8859-1. I don't know where you got the idea that it represents some kind of apostrophe-like character but it doesn't.
    Edit: Actually, I do know where you got that idea. You got it from Windows-1252:
    http://en.wikipedia.org/wiki/Windows-1252
    Not the same charset at all.

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi,
    when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.
        String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>
                              <category name="SearchByAttributes" value="Search By Attributes">
                                <item name="ORDER_LINE_ID" description="Application Search Attributes" >
                                   <attribute name="Sequence" value="0001"/>
                                 </item>
                                </category>"      
    My "xml string" has the encoding vaule: WINDOWS-1252.
    I am using the following code to convert the "xml string" to Document. I am getting the Document values as a "null" while converting the above "string xml"
            String strXML = //my above string xml.
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            docBuilder = docBuilderFactory.newDocumentBuilder();
            doc = docBuilder.parse(new InputSource(new StringReader(strXML)));              
            System.out.println("doc value.."+doc)//I am getting null value for "doc".
    Can anyone help me to resolve the issue.

    Thagelapally wrote:
    I am coverting the below "XML string" to Document, once it is converted I am reading that Document,which have an "attribue" Element in.
      String strXML = "<?xml version="1.0" encoding="WINDOWS-1252"?>
    <category name="SearchByAttributes" value="Search By Attributes">
    <item name="ORDER_LINE_ID" description="Application Search Attributes" >
    <attribute name="Sequence" value="0001"/>
    </item>
    </category>" I am using the above code to read the Document. When run the code in "OC4J Server" and using Jdeveloper as an editor,I am able to perfectly read the "attribute" element in the document with out any problem.Println statement printing as I expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."attribute"(as expected)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."oracle.xml.parser.v2.XMLAttrList@afe"But when run the same code(reading the same Document) in Tomcat and Eclipse,println satatement not printing as i expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."#text"(I am expecting output value "attribute" but it is printing "#text" which i don't know)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."null"(I am expecting output value object reference but it is printing "null"
    (without the rest of the code, i'm guessing that) most likely you are grabbing the first child node of the item element. however, you are not accounting for some text nodes that are most likely in that list, like the whitespace between the item element and the attribute element. please go read some tutorials on xml, there are thousands of them out there, and they will answer all you initial questions much more efficiently than posting each step to the forums.

  • Is there a way to get the actual XML string when using the JAXP SAX Parser?

    Hi All,
    I am using a JAXP SAX xml parser and am looking for a way to get the actual line of xml that is being parsed from within a content handler.
    Here's my scenario. Consider the following example xml document.
    <formCollection>
       <form name="myForm">
          <text/>
          <selection/>
       </form>
       <form name="anotherForm">
          <text/>
       </form>
    </formCollection>My hope is to validate the entire document and then insert an xml string containing each "form" element (and its sub-elements) into a map for later use. My thought was to create a String as each "form" element is being parsed (begining with the form's startElement event and concatenating until the form's endElement event is reached) and then inserting this string into the map. Is there a way to get the actual line of xml that is being parsed, rather than just the element name and attribute values?

    DrClap wrote:
    YouRang wrote:
    2. The first handler would validate the entire XML document, extract the "type" attribute from each <form> element, and place each <form> element and its sub-elements into the map of Strings, using the "type" attribute as the key. The second handler would take a <form> element and parse it into a Form object for the display. This option was the impetus for my question because it relies on the first handler being able to access the entire <form> element XML String and write it to a map.I don't see why you need the raw data from the XML document here. You should already be abstracting your data into Java classes in the first handler, instead of making the second handler do the parsing all over again.Correct, I am not referring to XForms. In this case, it happens that I am using the XML to generate an SWT ScrolledForm object and, thus, the XML element name happens to be named "form." However, the concept/design problem could apply to any type of object and the XML element could be appropriately renamed.
    My experience with XSLT is limited and I haven't done anything with it for several years. With that said, it seems that it is primarily used for generating web content, which wouldn't apply in this case because this is for a client-server application. I could be off base on this one -- if XSLT applies to much broader translations and would be more appropriate for generating Java objects than my current methodology, I could certainly look into it further.
    I apologize that option two didn't make more sense; it is difficult to explain. Yes, optimally the data should be abstracted into Java classes in the first handler. This is really an elaboration that I failed to specify when explaining option one. The problem is that the user can choose to create any number of "forms" of any type. For instance, let's say that from the File -> New menu there are options for seven different types of forms and each form is used to send completely different data. The user can select form1, select form1 again, select form4, and select form7 (or any other combination) and bring up tabs that display the different forms. The user can then enter data and submit each form separately. When the user selects File -> New -> FormX, a SWT ScrolledForm object that corresponds with FormX must be given to the display. Because SWT ScrolledForm objects do not allow a deep copy, I cannot simply read the XML <form> elements at initialization, parse them into ScrolledForm objects, and pass deep copies of the ScrolledForm objects to the display each time the user clicks File -> New -> FormX. The only simple way I see of getting a new copy of a ScrolledForm object is to reparse the appropriate XML <form> element in order to create one each time the user selects File -> New -> FormX. As such, one handler would need to read the entire XML document and parse the <form> elements into a map (or some other data structure) and another handler would need to parse individual <form> elements into SWT ScrolledForm objects. The first handler would be called at initialization and the second handler would be called each time a user clicked on File -> New -> FormX. Once again, this isn't exactly my favorite implementation... but seems the simplest given that there is no way to do a deep copy of an SWT ScrolledForm object. Hopefully that makes a little more sense. No worries if it doesn't -- I just figured I'd throw this out there and see if anyone had a better idea.

  • Does anyone can help me to import XML string into a ORACLE database

    Hi guys!
    i have some problem that my friend wants me to convert XML string to Oracle relational database which means.
    let's say, there is a table that a row has XML string.
    so table has XML string with varchar type.
    what my friend want me to do is, the string needs to be solved as a relational database.
    like
    A table has 'ID', 'data', 'result' rows
    and Data column has XML string like <?xml version...............>
    then wants to convert that data column's XML data into TABLE B with structure normally XML has.
    i'm so confused and have no idea at all.. also i couldn't find any solution related to my stuff..
    if someone knows how to solve the problem, just let us know
    thx

    The database is 10.2.0
    What sort of example do u want me to give you..
    i thought i give all information on the post..
    i will explain it
    let's say there are 3 columns ID,Name,Code
    Id = normal integer
    Name= varchar
    Code= varchar
    and i need to conver that XML in the Code column into relational databases
    the code column has normal XML code which is starting from <?xml version.... and so on
    so does it explain?
    please help me!

  • Very large XML String parameters

    Hi !
    I'm using AXIS 1.x, websphere 5 --- The problem is - when i call webservice with xml (String) parameter upto size of 10kb-400kb.. it works fine..
    But my application could genrate very large xml, like 900kb-1000kb even more.. When this large XML is sent as String parameter.. no reply is recieved back..
    Can some body throw some light.. what is going wrong... and which approch to be followed.
    Thanks a lot
    @mit

    Maybe this example on the XDB forum will be helpful...
    XMLType view of Relational Content
    XML type questions are best asked in that forum.
    ;)

  • Process xml string on url

    Hi,
    I need to build a page that will do the following and I'm
    hoping for some
    guidance..
    remote client open URL
    http://domain.com/getdata.cfm
    remote client check that the port is open then send xml
    string
    the page needs to process the xml string
    example: <data>
    <id>1</id>
    <event>sales</event>
    </data>
    after process send back a respond...
    I don't know where to begin doing something like this... any
    suggestions
    would be greatly appreciated!

    I tried that, and it in fact is a string. I also renamed my
    function correctly (i.e. loadMovie), but I'm still getting the
    'undefined' issue for the URL. I've tried to comment a little more
    in the text below. The problem seems to be in the last 4 or 5 lines
    where I'm trying to use a variable string to define the url instead
    of a hard coded string with " quotes ".
    Thanks again! :)
    // Create new XML Object and set ignoreWhite true
    book_xml = new XML();
    book_xml.ignoreWhite = true;
    // Setup load handler which just invokes another function
    // which will do the parsing of our XML
    book_xml.onLoad = function(sucess) {
    if (sucess) {
    processBook(book_xml);
    // Load up the XML file into Flash
    book_xml.load('book.xml');
    // This is the function that will be called when
    // our XML document is loaded succesfully
    function processBook(xmlDoc_xml) {
    // xmlDoc_xml is now a reference to the XML
    // object where our information is stored
    // the content of the first three variables below display
    fine because the variables are
    // linked to a dynamic text field. The 4th is not working
    since I am using it to define
    // the URL in the loadmovie function below.
    topictxt1_var =
    (xmlDoc_xml.firstChild.firstChild.firstChild.firstChild.nodeValue);
    bodytxt1_var =
    (xmlDoc_xml.firstChild.firstChild.firstChild.nextSibling.firstChild.nodeValue);
    instructions_var =
    (xmlDoc_xml.firstChild.firstChild.firstChild.nextSibling.nextSibling.firstChild.nodeValue );
    media_var =
    (xmlDoc_xml.firstChild.firstChild.firstChild.nextSibling.nextSibling.nextSibling.firstChi ld.nodeValue);
    //The problem here is that the variable media_var contains
    the string "images/award.jpg" without the quotes.
    //In the loadmovie function needs the quotes " at the
    beginning and end of the string images/award.jpg to define the URL.
    //This works>> loadMovie("images/award.jpg", image_mc);
    //This doesn't
    loadMovie(media_var, image_mc);

  • URLEncoder and URLDecoder for posting XML Strings

    Hi All
    I need to post an XML string to another website using POST.
    I have some java code that generates the XML string and sets the request object with this parameter. In my JSP I need to assign this to a hidden form element so that when a user clicks on "Submit", the destination site can extract the xml string.
    The problem i am facing is that while setting the hidden form element
    e.g. <input type=hidden name=xmlstr value= //Set it by reading the parameter from the request object.
    only the initial part of the string is picked up i.e. only upto the first double quotes " i.e. upto <?xml version=
    I am thinking of using URLEncoding to encode the xml while posting and URLDecoding to decode this xml.
    Is there a better way of doing this ?
    Thanks
    Bits

    I think that is the 'correct' thing to do. parameter values must be URLEncoded whether being posted or not.

Maybe you are looking for

  • How to pop-up Outlook Email window with To: blank?

    Hi All, I currently have a page which shows multiple rows with checkboxes. I have an After Submit process which loops through the rows and stores some values of the checked rows into a variable to be used as the body of an email. I then call apex_mai

  • Authorisation importing using DI API template

    Dear All Experts/Gurus, I am not so sure if this issue is possible to do using DI API template. I have set authorization in a certain database (e.g. database A), after that I want to use the same setting in database B. How to do this ? using query or

  • Text replacing image! HELP!

    So I am creating my first website, and I have gone through those tutorials in order to get a good feeling for dreamweaver, I am making a site that is mainly table based, and I want to put images over a image, but everytime I do it it deletes the imag

  • I cannot activate the "remember passwords of visited sites.

    The choice remains grey when I try to check the box and activate the option. I am running an old 386 tower with a freshly reinstalled Vista OS and Firefox 17.0.1.

  • Hp2000-428dx notebook pc

    At start up, I'm told "a fan is not working properly". What do I do now?