XML content parsed incorrectly

Hello,
Using HTTPService I read in an XML file containing
hexadecimal values. However, it seems like Flex is trying to
convert those to numbers. Now it doesn't throw an error, but in
case of a value like '660528E7' it is turned into '6605280000000',
which is not what I want.
How can I stop Flex from trying to parse any value in the XML
file? It simply should treat everything as a string.
Regards,
Ruud

What resultType are you using in your HTTPService? The
default type of object will interpret the results using the default
XML decoder. You can either read the data in as E4X, which will
give you an XML object that has all strings, or you can write your
own decoder.
Tim

Similar Messages

  • XML Parser returning XML content

    This probably seems like overkill..
    Im building a JSP that reads in XML and parses it. I then need to filter for specific values in the XML, and return a chunk of the XML to the output stream.
    So far I've got..
          //set-up in and content-type
            FileInputStream file = new FileInputStream (getServletContext().getRealPath("/games_arcade/xml/game_marketing_content.xml"));
            //response.setContentType("text/xml");
            //parse the request
            Document doc = null ;
            try {
                   DocumentBuilderFactory docBuilderFact = DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = docBuilderFact.newDocumentBuilder();
                   doc = docBuilder.parse(file);
                   out.println("Go on ya good thing!!!");
            } catch (ParserConfigurationException pcEx) {
                throw new ServletException("jaxp not configured!", pcEx);
            //get needed data from the xml
            NodeList games = doc.getElementsByTagName("game");
              out.println(output.toString());
              Now Im lost. All the requisites are there, imports etc, Im just stuck with filtering the NodeList.
    Or am I completely wrong with this approach?
    Any help greatly appreciated.
    thanks!
    Stephen

    Hi,
    thanks for the replyand suggestions. Have a bit of an issue with this method, this method (due to technical limitations) is completely JSP, using a standard iPlanet 6.1 classpath. I cant deploy WAR's (and cant use taglibs). Xpath/XSL would be ideal, but how do I write the output as XML?
    So are you suggesting
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html"/>
        <xsl:template match="/">
            <xsl:for-each select="games/game">
              <xsl:if test="@id = $GAMEID">
                   ... output the xml node using value-of's etc...
              </xsl:if>
            </xsl:for-each>
          </xsl:template>
        </xsl:stylesheet>Cheers Dr Clap!
    Stephen

  • Does JMS parse xml content in TextMessages

              Hi
              I am working on WLS 6.1sp2 and I am using jms TextMessage type of message to
              send XML messages from one subsystem to another. I have added an XML registry
              for my version of XML parser. Now I do not have any entries for the entity declarations
              nor for the parser entries in the registry.
              When I send in an XML message in a TextMessage envelope I find the following
              errors in the log.
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
              ment.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve SYSTEM id. The root element is required in a well-formed docu
              ment.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve root tag. The root element is required in a well-formed docum
              ent.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory class
              specified in the Server console. Invalid parameters: at least one of publicId,
              s
              ystemId, rootTag must be non-null>
              [ChangeAwareClassLoader] : Name is : META-INF/services/org.apache.xerces.xni.par
              ser.XMLParserConfiguration
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
              ment.>
              Now from the logs I understand that the message is being parsed and since the
              parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since I am
              using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also this
              is not logged by any component of my subsystems, this is a weblogic XML Service
              log and when I trace through the code I find that it comes up after the first
              subsystem sends the message and before the second subsystem receives it.
              The question then is does JMS parse XML content in TextMessages and if so how
              can I disable that parsing?
              Thanks
              Sandeep
              

    JMS does not automatically parse TextMessages. Check the XML declaration in
              your application's deployment descriptors. That's often the source of this
              error.
              FYI, you can use XMLMessage for xml payloads. As far as I can remember, the
              XMLMessage is an extension of the TextMessage with xml parsing built in.
              Adarsh
              "Sandeep Nayak" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi
              >
              > I am working on WLS 6.1sp2 and I am using jms TextMessage type of message
              to
              > send XML messages from one subsystem to another. I have added an XML
              registry
              > for my version of XML parser. Now I do not have any entries for the entity
              declarations
              > nor for the parser entries in the registry.
              >
              > When I send in an XML message in a TextMessage envelope I find the
              following
              > errors in the log.
              >
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve PUBLIC id. The root element is required in a
              well-formed docu
              > ment.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve SYSTEM id. The root element is required in a
              well-formed docu
              > ment.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve root tag. The root element is required in a well-formed
              docum
              > ent.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory
              class
              > specified in the Server console. Invalid parameters: at least one of
              publicId,
              > s
              > ystemId, rootTag must be non-null>
              > [ChangeAwareClassLoader] : Name is :
              META-INF/services/org.apache.xerces.xni.par
              > ser.XMLParserConfiguration
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve PUBLIC id. The root element is required in a
              well-formed docu
              > ment.>
              >
              > Now from the logs I understand that the message is being parsed and since
              the
              > parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since
              I am
              > using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also
              this
              > is not logged by any component of my subsystems, this is a weblogic XML
              Service
              > log and when I trace through the code I find that it comes up after the
              first
              > subsystem sends the message and before the second subsystem receives it.
              >
              > The question then is does JMS parse XML content in TextMessages and if so
              how
              > can I disable that parsing?
              >
              > Thanks
              >
              > Sandeep
              

  • How to read XML content from IPortalComponentRequest and parse them

    Hi ,
    I have a portal application.The application has 2 components(Comp1,comp2).
    Comp1 is JspDynpage and Comp2 is AbstractPortalComponent.
    Comp1- has a iframe element which point to the external url and has a parameter return_url.
    retrun_url has a value as url to Comp2(http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp)
    When an event occurs in the external site,i suppose to receive XML content in return_url(ie Comp2),how can i check using the request if the received content is XML and how do i parse them.
    I have already seen blogs from Prakash singh in which it refers a xml fixed location in webserver.

    Hi Detlev,
    i am reposting this once again as the previous
    reply didnt align good.
    Thanks for your reply.The scenario is that
    My portal application has to communicate with external GIS(Graphical information system)
    service provider client application.
    They say that i have to use iframe in my portal application.
    Here is the snipet of the iframe tags.
    <iframe
    id="Nedbrowser"
    name="Nedbrowser"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:0; left:0; width:800; height:400; z-index:100; visibility:visible"
    src="http://nbg.nedg.nl/nbgint/NBG_INT_main.asp?action=CHART&datasource=NBGMV&product=INTERNET&size_x=300&size_y=300&result_frame=Results&
    result_url=http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp&
    default_centre_x=256000&default_centre_y=471000&default_width=0.5">
    </iframe>
    <iframe
    id="Results"
    name="Results"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:400; left:0; width:800; height:200; z-index:100; visibility:visible"
    src="about:blank">
    </iframe>
    When my portal application is started, comes the GIS map in the iframe with in my portal application.
    When the user clicks in the area of the map,Gis application returns xml data to the return_url.
    The reurn_url is my PortalAbstractComponent in which i have to parse the xml and use it for further processing in R3 system.

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Efficient way for Continous Creation of XML Content?

    Hi
    I have a requirement of creating xml content from the data extraced from a udp packet.
    As the packet arrives, i have to generate appropriate xml content from them and keep in the same single xml file.
    Problem:
    Since the xml file is not a flat file, i can't just append the new contents at the end. So if i have to write into xml file, Each and Every time i have to parse the content as a packet arrives and insert the new content under appropriate parent. I think this is not the most efficient way.
    Every time parsing the file may affect cpu time and as the file grows in size, the memory will also be a constraint.
    Other options i could think of
    * Hold the XML Document Object in memory until a certain event like timeout for receiving packet and write into the xml file at oneshot.
    * Serialize the objects containing the extracted packet content to a temp file and after some event, parse and create the xml file at oneshot
    Which is the efficient way or is there any design pattern to handle this situation? I am worried about the memory footprint and performance on peak loads
    I am planning to use JDOM / SAX Builder for xml creation.
    Thank you...

    Lot's of "maybe" and "I think" and "I'm worried about" in that question, and no "I have found" or "it is the case that". In short, you're worrying too much about problems you don't even know you have. XML is a verbose format anyway, efficiency isn't paramount when dealing with it. Even modestly powered machines can deal with quite a lot of disk I/O these days without noticeable impact. The most efficient thing you can do here is write something that works, and see if you can live with the performance

  • Import of XML file failed in portal using XML Content and Action

    Hi Friends,
    I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS  which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
    The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
    <GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
    <Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context>     <Property name="parent1" value="pcd:portal_content"/>
         <Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
              <Attributes>
                   <Attribute name="com.sap.portal.pcm.Description" type="text">
                        <AttributeValue value="" locale=""/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
                   <Attribute name="com.sap.portal.pcm.Title" type="text">
                        <AttributeValue value="test" locale=""/>
                        <AttributeValue value="test" locale="en"/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="mandatory" type="string">
                             <AttributeValue value="true"/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
              </Attributes>
         </Context>
    </GenericCreator>
    SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
    Status Name Action Type Comment
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
    Dont know is there a service/ configurations needs to be done to enable this feature?.
    Thanks
    Edited by: hammad on Sep 4, 2009 5:48 PM
    Edited by: hammad on Sep 4, 2009 5:49 PM

    The problem statement is not very clear.
    Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
    Best Regards,
    Prasanna K

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • XML content in MHP-Xlet

    Hello!
    I am working on a MHP-application that contacts a server and loads an XML-file, but I have problems, sorting and displaying the XML-content in my Xlet.
    I am using nanoXML to parse the file and via the debug-output of my STB (or the IRT-SW-box) I can see, that this is succesful - but I have no idea how to fill a text-area with the content of my XML-file.
    Has anybody done something like that? And is it possible to write XML-files on a server via the back channel? Maybe with FTP?
    Thanks a lot!

    To answer the other part of the question, it is possible to write files to a server over the return channel. You will need to implement the protocol yourself, however, so in the FTP example you would have to include a simple FTP client in your application.
    Depending on your needs, you may want something more secure than FTP, but this is obviously a design decision for your project.
    Steve

  • Accessing the xml content

    can any one help me to access the xml contents using a servlet or a java code.
    eg: there are some tags in xml and i want to access those contents from those tags and display it..
    if u can please mail me to:
    [email protected]

    Hi Suresh
    I need the same one for my requirement if u have please post to this site or send me an email .
    [email protected]
    I can able to parsed one structured XML file using SAX
    Sample code :
    // ===========================================================
         // SAX DocumentHandler methods
         // ===========================================================
         public void startDocument() throws SAXException {
              logger.info("Start of document");
         public void endDocument() throws SAXException {
              logger.info("End of document");
         public void startElement(String namespaceURI, String localName, // local
                   // name
                   String qualName, // qualified name
                   Attributes attrs) throws SAXException {
              elemName = new String(localName); // element name
              if (elemName.equals(""))
                   elemName = new String(qualName); // namespaceAware = false
              tagPosition = TAG_START;
              // Set the string for accumulating the text in a tag to empty
              elemChars = "";
              // If the element name is "row", create a new row instance
              // If the element is "indexxid", "ModelPrice", or "ModelSpread",
              // the value will be read in the method "characters" and stored.
              if (elemName.equals("row")) {
                   row = new IndexRow();
                   numRows++;
              // logger.info("Number of numRow:"+numRows);
         } // end method startElement
         public void endElement(String namespaceURI, String simpleName, // simple
                   // name
                   String qualName // qualified name
         ) throws SAXException {
              elemName = new String(simpleName);
              if (elemName.equals(""))
                   elemName = new String(qualName); // namespaceAware = false
              tagPosition = TAG_END;
              String indexId = new String();
              Double dblVal = new Double(0);
              // If element name is "row", put the current row in the map for row
              // instances
              if (elemName.equals("row")) {
                   if (numRows <= 5) { logger.info("Row is: " + row.toString()); }
                   //ABX
                   //indexRows.put(row.getIndexxId(), row);
                   if (family.equals("ABX.HE")){
                   indexRows.put(row.getIndexREDId(), row);
                   else {
                        //CDX ITRXX
                             indexRows.put(row.getIndexxId(), row);
              } else if (elemName.equals("IndexID")) {
                   row.setIndexxId(elemChars);
              else if (elemName.equals("ModelPrice")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setModelPrice(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("ModelSpread")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setModelSpread(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("CompositePrice")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setCompositePrice(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("CompositeSpread")) {
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setCompositeSpread(dblVal);
                        indexId = row.getIndexxId();
              } else if (elemName.equals("REDCode")) {
                   row.setRedCode(elemChars);
              else if (elemName.equals("Name")) {
                   row.setRowName(elemChars);
              } else if (elemName.equals("Series")) {
                   row.setSeries(elemChars);
              } else if (elemName.equals("Version")) {
                   row.setVersion(elemChars);
              } else if (elemName.equals("Term")) {
                   row.setTerm(elemChars);
              } else if (elemName.equals("Maturity")) {
                   row.setMaturity(elemChars);
              } else if (elemName.equals("OnTheRun")) {
                   row.setOnTheRun(elemChars);
              } else if (elemName.equals("Date")) {
                   row.setRowDate(elemChars);
              } else if (elemName.equals("Depth")) {
                   row.setDepth(elemChars);
              else if (elemName.equals("Heat")) {
                   // logger.info("Chars for element " + elemName + " are '" +
                   // elemChars + "'");
                   // Leave double value at default of zero if there are no chars
                   if (elemChars.trim().length() != 0) {
                        dblVal = new Double(elemChars);
                        row.setHeat(dblVal);
                        indexId = row.getIndexxId();
    //          ABX.HE
              else if (elemName.equals("IndexREDId")){
                   row.setIndexREDId(elemChars);
              else if (elemName.equals("Coupon")){
                   row.setCoupon(elemChars);
              if (elemName.equals("Ontherun")) {
                   row.setOnTheRun(elemChars);
         } // end method endElement
         public void characters(char buf[], int offset, int len) throws SAXException {
              // If at end of element, there will be no characters
              if (tagPosition == TAG_END) {
                   return;
              // The characteres method may be called more than once
              // for an element if the internal buffer fills up.
              // Append the characters until the end of the element.
              String strVal = new String(buf, offset, len);
              elemChars = elemChars + strVal;
         } // end method characters
    } // end class MarkItIndexLoader
    but the problem is i want to parse any XML file means any Elemets would be change any time using SAX .In the above example
    else if (elemName.equals("Heat")) {
    else if (elemName.equals("IndexREDId")){
    } else if (elemName.equals("Maturity")) {
    like above I am doing hard code so i don't want hard coding the elements names I want to read any element name and value dynamically.
    Dynamically i want to read the root and child elements
    EX: I can give any XML file like
    Student.XML: <root>..</StName>..</StAge>...</root>
    Employee.XML: <root>..</EmpName>..</EmpAge>...</root>
    CdCatalog.XML: <root>..</Cdtitle>...</CdNumber>...</root>
    I need one java program can ready any type of XML file elements and send to the Database table.
    Please any one done like this task please suggest some reference links or books or sample snippet which can help me to develop program in my requirement.

  • Component for XML content visualization providing content format

    Hi,
    I have a XML content which is just coming to my WD application as string - no tabs, no empty spaces - it is just one long string token.
    Is there any WD component which can provide the format of this xml content string (similar for example to the built in viewer within Web Dynpro explorer), or I have to parse it on my own and visualize it within a text view for example?

    Hi Maksim,
    I tried in this way, but I am working with NY version of WD and there is no IFrame UI component, what component to use to visualize this URL content?
    I tried FormattedTextEdit, which bind to the url string and got an exception
    java.lang.ClassCastException: java.lang.String
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.FormattedTextEdit.getValue(FormattedTextEdit.java:764)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.FormattedTextEditAdapter.getHtmlText(FormattedTextEditAdapter.java:286)
        at com.sap.tc.ur.renderer.ie6.RichTextEditRenderer.render(RichTextEditRenderer.java:38)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:323)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:153)
    Regards, Tihomir

  • XML Custom Parser

    I am tryint to write a custom XML parser but I am having trouble accessing the Value fields. I need to use one of the Value Fields to determine which parser I need to use for my custom Class Objects. Below is my sample code and a sample XML Document that I am trying to Parse. I hope that it will reformat. If not then I am sorry for the format.
    public LibraryObject parse(InputStream p_file, ParserCallback p_callBack, Hashtable p_opts)
    throws oracle.ifs.common.IfsException
    XMLDocument xmlDoc = new XMLDocument();
    IfsXmlParser parser = new IfsXmlParser(m_Session);
    xmlDoc = parser.createDOM(p_file, false);
    NodeList list = xmlDoc.getElementsByTagName("Value");
    for (int i=0; i < list.getLength(); i++) {
    printNodeInfo(list.item(i));
    // This gives me a Type Casting error!
    // Here is the problem
    CharacterData temp = (CharacterData)list.item(i);
    <?xml version='1.0'?>
    <Records>
    <Record>
    <Field id='Remote_User' type='string' length='30'></Field>
    <Field id='Time_Stamp' type='string' length='30'><Value>02/01/01 02:03:13 PM</Value></Field>
    <Field id='Suspense_File' type='string' length='30'><Value>T:\teleform\bat\00000053\7H6CUO0000.tct</Value></Field>
    <Field id='Remote_Uid' type='number' length='10'><Value>-1</Value></Field>
    <Field id='Remote_Fax' type='string' length='30'><Value>Y087EY0000.TIF</Value></Field>
    <Field id='Form_Id' type='number' length='10'><Value>18567</Value></Field>
    <Field id='OrigPgSeq' type='string' length='128'><Value>0</Value></Field>
    <Field id='Orig_File' type='string' length='128'><Value>T:\teleform\bat\00000053\HDKHBA0000.tct</Value></Field>
    <Field id='SKFI_Zone_1' type='string' length='30'></Field>
    <Field id='First_Name' type='string' length='15'><Value>Jason</Value></Field>
    <Field id='Middle_Name' type='string' length='15'><Value>Paul</Value></Field>
    <Field id='Last_Name' type='string' length='30'><Value>Adkison</Value></Field>
    <Field id='Suffix' type='string' length='10'><Value>Mr</Value></Field>
    <Field id='Address_1' type='string' length='50'><Value>5532 Overlook NE</Value></Field>
    <Field id='Address_2' type='string' length='50'><Value>Albuquerque</Value></Field>
    <Field id='Zip_Code' type='string' length='15'><Value>87111</Value></Field>
    <Field id='Home_Phone' type='string' length='15'><Value>505-555-5555</Value></Field>
    <Field id='Work_Phone' type='string' length='15'><Value>505-555-5555</Value></Field>
    <Field id='E_Mail' type='string' length='20'><Value>[email protected]</Value></Field>
    </Record>
    </Records>

    Jason
    You are making incorrect assumptions regarding what is contained in the NodeList.
    The folllowing should explain
    public void doSomething(LibrarySession ifs)
    throws IfsException
    try {
    InputStream is = new FileInputStream("c:\\temp\\testfile.xml");
    IfsXmlParser parser = new IfsXmlParser(ifs);
    XMLDocument xmlDoc = parser.createDOM(is,false);
    xmlDoc.print(System.out);
    NodeList nodes = xmlDoc.getElementsByTagName("Value");
    for (int i=0;i<nodes.getLength();i++) {
    Node node = nodes.item(i);
    System.out.println("Node " + i + " is an instance of " + node.getClass());
    System.out.println("The value of the Text for the Node is " + node.getFirstChild().getNodeValue());
    } catch (java.io.IOException x) {
    throw new IfsException(9999,x);
    generates
    Transaction Started.
    <?xml version = '1.0'?>
    <Records>
    <Record>
    <Field id="Remote_User"
    type="string" length="30"/>
    <Field id="Time_Stamp" type="string" length="30">
    <Value>02/01/01 02:03:13 PM</Value>
    </Field>
    <Field id="Suspense_File" type="string" length="30">
    <Value>T:\teleform\bat\00000053\7H6CUO0000.tct</Value>
    </Field>
    <Field id="Remote_Uid" type="number" length="10">
    <Value>-1</Value>
    </Field>
    <Field id="Remote_Fax" type="string" length="30">
    <Value>Y087EY0000.TIF</Value>
    </Field>
    <Field id="Form_Id" type="number" length="10">
    <Value>18567</Value>
    </Field>
    <Field id="OrigPgSeq" type="string" length="128">
    <Value>0</Value>
    </Field>
    <Field id="Orig_File" type="string" length="128">
    <Value>T:\teleform\bat\00000053\HDKHBA0000.tct</Value>
    </Field>
    <Field id="SKFI_Zone_1" type="string" length="30"/>
    <Field id="First_Name" type="string" length="15">
    <Value>Jason</Value>
    </Field>
    <Field id="Middle_Name" type="string" length="15">
    <Value>Paul</Value>
    </Field>
    <Field id="Last_Name" type="string" length="30">
    <Value>Adkison</Value>
    </Field>
    <Field id="Suffix" type="string" length="10">
    <Value>Mr</Value>
    </Field>
    <Field id="Address_1" type="string" length="50">
    <Value>5532 Overlook NE</Value>
    </Field>
    <Field id="Address_2" type="string" length="50">
    <Value>Albuquerque</Value>
    </Field>
    <Field id="Zip_Code" type="string" length="15">
    <Value>87111</Value>
    </Field>
    <Field id="Home_Phone" type="string" length="15">
    <Value>505-555-5555</Value>
    </Field>
    <Field id="Work_Phone"
    type="string" length="15">
    <Value>505-555-5555</Value>
    </Field>
    <Field id="E_Mail" type="string" length="20">
    <Value>[email protected]
    </Value>
    </Field>
    </Record>
    </Records>
    Node 0 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 02/01/01 02:03:13 PM
    Node 1 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is T:\teleform\bat\00000053\7H6CUO0000.tct
    Node 2 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is -1
    Node 3 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is Y087EY0000.TIF
    Node 4 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 18567
    Node 5 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 0
    Node 6 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is T:\teleform\bat\00000053\HDKHBA0000.tct
    Node 7 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is Jason
    Node 8 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is Paul
    Nod e 9 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is Adkison
    Node 10 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is Mr
    Node 11 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 5532 Overlook NE
    Node 12 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is Albuquerque
    Node 13 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 87111
    Node 14 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 505-555-5555
    Node 15 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is 505-555-5555
    Node 16 is an instance of class oracle.xml.parser.v2.XMLElement
    The value of the Text for the Node is [email protected]
    Transaction Completed.
    Successful End of Program.
    null

  • XML SAX parser that support  LexicalHandler

    Hello,
    I'm looking for an XML SAX parser that support a LexicalHandler.
    I have xml files that are not well formed, ie: (&, <, >, etc...) characters within tags and I need to ignore them.
    Anyone have a link to some opensource library ??
    Thanks,
    Samir

    Don't waste your time. Using a LexicalHandler isn't going to help with parsing malformed XML. You should get the person who produced those files to replace them with correct XML.
    PC&#178;

  • Performance question on small XML content but with large volume

    Hi all,
    I am new to Berkeley XML DB.
    I have the following simple XML content:
    <s:scxml xmlns:s="http://www.w3.org/2005/07/scxml">
    <s:state id="a"/>
    <s:state id="b"/>
    <s:state id="c"/>
    </s:scxml>
    about 1.5K bytes each but the total number of such content is large (5 million+ records).
    This is a typical query:
    query 'count(collection("test.dbxml")/s:scxml/s:state[@id="a"]/following-sibling::s:state[@id="e"])'
    where the id attribute is used heavily.
    I've tested with about 10000 records with the following indexes:
    Index: edge-attribute-equality-string for node {}:id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: edge-element-presence-none for node {}:scxml
    Index: edge-element-presence-none for node {}:state
    but the query took just under one minute to complete. Is this the expected performance? It seems slow. Is there anyway to speed it up?
    In addition, the total size of the XML content is about 12M but ~100M of data is generated with the log.xxxxxxxxxx files. Is this expected?
    Thanks.

    Hi Ron,
    Yes, I've noticed the URI issue after sending the post and changed them to:
    dbxml> listindex
    Default Index: none
    Index: edge-attribute-equality-string for node {http://www.w3.org/2005/07/scxml}
    :id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:scx
    ml
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:sta
    te
    5 indexes found.
    I added more records (total ~30000) but the query still took ~1 minute and 20 seconds to run. Here is the query plan:
    dbxml> queryplan 'count(collection("test.dbxml")/s:scxml/s:state[@id="start"]/fo
    llowing-sibling::s:state[@id="TryToTransfer"])'
    <XQuery>
    <Function name="{http://www.w3.org/2005/xpath-functions}:count">
    <DocumentOrder>
    <DbXmlNav>
    <QueryPlanFunction result="collection" container="test.dbxml">
    <OQPlan>n(P(edge-element-presence-none,=,root:http://www.sleepycat.com
    /2002/dbxml.scxml:http://www.w3.org/2005/07/scxml),P(edge-element-presence-none,
    =,scxml:http://www.w3.org/2005/07/scxml.state:http://www.w3.org/2005/07/scxml))<
    /OQPlan>
    </QueryPlanFunction>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="scxml" nodeType="element"/>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="start" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    <DbXmlStep axis="following-sibling" prefix="s" uri="http://www.w3.org/20
    05/07/scxml" name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="TryToTransfer" typeuri="http://ww
    w.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    </DbXmlNav>
    </DocumentOrder>
    </Function>
    </XQuery>
    I've noticed the indexes with URI were not used so I added back the indexes without URI:
    dbxml> listindex
    Default Index: none
    Index: edge-attribute-equality-string for node {}:id
    Index: edge-attribute-equality-string for node {http://www.w3.org/2005/07/scxml}
    :id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    Index: edge-element-presence-none for node {}:scxml
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:scx
    ml
    Index: edge-element-presence-none for node {}:state
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:sta
    te
    8 indexes found.
    Here is the query plan with the above indexes:
    dbxml> queryplan 'count(collection("test.dbxml")/s:scxml/s:state[@id="start"]/fo
    llowing-sibling::s:state[@id="TryToTransfer"])'
    <XQuery>
    <Function name="{http://www.w3.org/2005/xpath-functions}:count">
    <DocumentOrder>
    <DbXmlNav>
    <QueryPlanFunction result="collection" container="test.dbxml">
    <OQPlan>n(P(edge-element-presence-none,=,root:http://www.sleepycat.com
    /2002/dbxml.scxml:http://www.w3.org/2005/07/scxml),P(edge-element-presence-none,
    =,scxml:http://www.w3.org/2005/07/scxml.state:http://www.w3.org/2005/07/scxml),V
    (edge-attribute-equality-string,state:http://www.w3.org/2005/07/scxml.@id,=,'sta
    rt'),V(edge-attribute-equality-string,state:http://www.w3.org/2005/07/scxml.@id,
    =,'TryToTransfer'))</OQPlan>
    </QueryPlanFunction>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="scxml" nodeType="element"/>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="start" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    <DbXmlStep axis="following-sibling" prefix="s" uri="http://www.w3.org/20
    05/07/scxml" name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="TryToTransfer" typeuri="http://ww
    w.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    </DbXmlNav>
    </DocumentOrder>
    </Function>
    </XQuery>
    The indexes are used in this case and the execution time was reduced to about 40 seconds. I set the namespace with setNamespace when the session is created. Is this the reason why the indexes without URI are used?
    Any other performance improvement hints?
    Thanks,
    Ken

  • Pass parameter through standard page "import xml content and actions"

    Dear Portal experts,
    As you know, a standard portal page is configured to allow the import of XML file. It is located in the portal in the path system admin -> transport -> xml content and actions -> import
    I configured a quick link u201Cimportu201D to the page so now the link http://myserver:port/irj/portal/import allows me to access directly to this screen.
    What I would like to do now is to pass the parameter related to u201Cfile nameu201D through this screen meaning that I would like that http://myserver:port/irj/portal/ import/filename=C:\test.xml  fills automatically the fields u201CXML fileu201D with  C:\test.xml 
    Please do you know how to achieve this ?
    Thank you very much and regards

    hi,
    @Maksim :
    When user launch an URL like http://myserver:port/irj/portal/ import/*filename=C:\test.xml, he is requested to provide username and password; as this link is a shortcut for the upload xml page, there is a check of authorization and only portal admin that have authorization and permission on this page/iview will be able to upload xml file through the URL. Hope this clarify.
    @Kumar :
    thank you for your answer. What a pity to not be able to pass parameter through standard portal page/iview particularly knowing that we can pass paramater through many kinds of iviews (transactional iview, url iview, VC iview...). I explored some option on file com.sap.portal.ivs.init.par but this was unsuccessful. However, thanks to this [link bellow|http://wiki.sdn.sap.com/wiki/display/Snippets/ComponenttouploadXMLfilewithPCD+objects], I was able to upload through URL the XML file.
    The problem is that I can upload only XML file that are stored in the server not in the local user computer. My requirement is to be able to upload local XML file stored on user's computer.
    If someone could provide and idea/solution, I would be very grateful.
    Cheers

Maybe you are looking for

  • Looking for help with iweb...

    i recently got iweb 08 and have been trying to get a few things to work... first of all, is there a way to put adsense ad's into text boxes (and then use word wrap), also, ive noticed that what ive done in the meantime is to create a box inside my te

  • Pdf documents to be printed appear as a black screen, what setting do i need to alter

    when i attempt ot print a pdf either a doc on the iMac or as a print option from an internet page, the preview displays a totally black page

  • Message: very low battery

    the ipod classic has been plugged into a power source for about 45 minutes but still has the message very low battery. The Apple icon comes on, then a clicking sound and the screen returns back to very low battery. The ipod has not been used in over

  • Specific material form specific vendor

    Dear Experts, As per my one plant ( Herbal Plant ) our requirment is following; A single material like abc will be provided by only two or three vendor 1/2/3, as per  our auditor No po should be create expect these vendor.How I restrict please explai

  • COPA Sales Planning issue

    Hi, We are uploading COPA sales planning price and quantity to derive the Revenue. Revenue = sales planning price * quantity Currency = USD (as default 2 decimal places) In Excel file we maintained planning price = USD 1.561 and Sales Quantity = 5000