Getting a local xml document to populate a listview works in "Live View", but fails in browsers

I'm am extremely new to this so if there is a link or tutorial that explains what I should be doing, please direct me there, however I was unable to locate one on this site.
Challenge:
I'm trying to build a mobile app to read a local xml file and populate a listview.  Everything works perfect in the 'Live View' mode of CS5.5, but when I go to preview in Safari or Firefox all that is generated is the  listview container with none of the xml loaded content.
I'm reading the xml file as text and then running it through parsexml.
I am sure there is something glaring that I am missing, but I've seen many posts on other sites (not dreamweaver specific) which have shown people struggling with how to accomplish reading a local xml file and using it in a mobile app.
Any Help, insights, suggestions or examples of how to make this work in more than just the 'Live View' will be greatly appreciated.
Many thanks in advance!
XML and Code is Below
XML:
<?xml version="1.0" encoding="utf-8"?>
<Components>
     <Component Id="1" Name="TermOne" Description="Definition of term one.">
           </Component>
        <Component Id="2" Name="Term Two" Description="Definition of term two.">
           </Component>
</Components>
CODE:
$(document).ready(function(){
           $.get( "jquery-mobile/dictionary.xml", function(xml) {
                     var xparse = $($.parseXML(xml));
                    var xlines = [];
                    xparse.find('Component').each(function(){
                              var name = $(this).attr('Name');
                              var description = $(this).attr('Description');
                              xlines.push('<li>' + name + ': ' + description + '</div></li>');
           $('#Dictionary').append(xlines.join(''));
           $('#Dictionary').listview('refresh');
           },"text");
Is there any dreamweaver expert out there who knows why this code will only render in liveview and not on the browsers?
Message was edited by: Lane Hammons

Thanks Murray!  viewing the source code, copy/paste worked!
I tried to use the insert image object for the next rollover button...but then got another error message (thankfully just one).  I know that I could simply copy the format that you did for the first button, but since this site will be image rollover intensive, I'd like to try to fix this error so I can use the design feature.
Here is the message from validator:
Line 73, Column 443: required attribute "alt" not specified
…me="familytrees" width="105" height="57" border="0" id="familytrees" /></a></p>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
I checked the document and both types have been entered - very confused.  Have any recommendations?
BTW - do you think it is a good idea for me to get css/html and or javascript for dummies?  Do those books really help novices, such as myself?
Your patience and help is great appreciated!

Similar Messages

  • SSRS Reports getting error in XML document (1, 6110).

    Hi,
    SCCM 2012 R2  Query reports opening error it shows below errors few reports only open properly.
    Stack Trace:
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    System.InvalidOperationException
    There is an error in XML document (1, 6648).
    Stack Trace:
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    System.Xml.XmlException
    '', hexadecimal value 0x1F, is an invalid character. Line 1, position 6648.
    Stack Trace:
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    Kiran

    This has already been discussed and solved, please use the search funtion:
    http://social.technet.microsoft.com/Forums/en-US/home?category=systemcenter2012configurationmanager&sort=relevancedesc&brandIgnore=True&searchTerm=There+is+an+error+in+XML+document+
    Torsten Meringer | http://www.mssccmfaq.de

  • How to get the WHOLE xml document inside a string using XSLT mapping

    Hi folks,
    I have a deep xml structure that I want to embed as body, tags included, in a mail message (not as an attachment).
    I'm trying to use Michal's method in this blog
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    However, I can't get it to deliver the entire structure instead of just specific elements.
    Any help is greatly appreciated,
    Thanks,
    Guy

    Ashok,
    I was able to work it out for my case.
    This XSL......
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <inside>
    <namestring>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="outside/name/*"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namestring>
    </inside>
    </xsl:template>
    </xsl:stylesheet>
    ...will transform this input....
    <?xml version="1.0" encoding="UTF-8"?>
    <outside>
    <name>
    <nameone>name1</nameone>
    <nametwo>name2</nametwo>
    <namethree>name3</namethree>
    </name>
    </outside>
    ...and put the whole lot into the CDATA element.
    Hope this helps you,
    Guy

  • If I buy a sim free phone here and take it to the Ukraine, can I get a local sim card and the phone still work properly, while in the Ukraine?

    If I buy a sim free phone here and take it to the Ukraine with me, can I get a card there in the Ukraine to use the phone with.  If that is possible, when I return to the states can I get an AT & T sim card and the same phone work in the states?  Thanks in advance for your help.

    If you buy an unlocked phone, it will work on any compatible GSM network anywhere in the world. If you buy an unlocked phone in the US, it will not work on LTE networks outside of North America. The warranty is also only valid in the country where the phone was originally sold.

  • Performing a mass rename on originals to get rid of backslashes in file names. Worked for most files but failed for some with OSSStatus -43. Can't find any info on error -43. Any ideas?

    I'm moving all my managed files to be referenced so I can access from both Aperture and lightroom. Needed to do a rename on 16,000 files to get rid of backslashes in the file names. Most of the time it worked but for 1093 files it gave OSSStatus -43. I've tried googling the error and got nothing. Any ideas where to begin looking?
    Thanks
    Jim

    How are you renaming the files? In the "File > Relocate original file" dialog panel? Are you using a custom name format?
    Have you checked in Aperture, if the originals, that are giving you the error message, are still inside the Aperture library?

  • Read XML file in WEB-INF works in exploded format but fails in EAR

    I'm able to read an XML file stored in the WEB-INF when my application is deployed in the exploded format, but when its deployed in an EAR, the reading fails.
              I read from forums that getRealPath could fail, so I added in the getResourceAsStream to fall back on. But in the EAR format, both fails.
              What did I miss out?
              Here's my codes:
                          StringBuffer configFileName = new StringBuffer();
                configFileName.append(File.separatorChar).append("WEB-INF");
                configFileName.append(File.separatorChar).append("app-config.xml");
                String fileName = getServletContext().getRealPath(configFileName.toString());
                if (fileName == null) {
                  request.setAttribute("efs/xmlmappings-is", getServletContext().getResourceAsStream(configFileName.toString()));
                } else {
                  request.setAttribute("efs/xmlmappings-str", fileName);
              

    Hi          > Thread.currentThread().getContextClassLoader().getReso
              > urceAsStream()
              >
              > getClass().getClassLoader().getResourceAsStream()
              > should also work
              > if the file is in WEB-INF/classes
              >
              > regards
              > deepak
              It works, thanks!

  • UTL_DBWS, XML Document as a parameter

    I'm struggling with using a fully formed xml document as a parameter to a web service.
    Using this code I'm able to connect to the web service and sans the arg1 argument everything works.
    When I as in the code below use xmltype.toStringValue() or xmltype.toClobValue() charachters like < and > is replaced with the html encoded version (&lt; and &gt;) which does'nt work very well with the recieving web service.
    All three parameters is defined as string on the recieving web service.
    I've been searching this forum and using google, but can't find any examples doing something like this.
    Any help or pointers appreciated.
    procedure forwardToQueue is
    svc_ sys.utl_dbws.service;
    call_ sys.utl_dbws.call;
    svc_qname sys.utl_dbws.qname;
    response sys.xmltype;
    request sys.xmltype;
    utMelding sys.xmltype;
    t1 sys.xmltype;
    t2 sys.xmltype;
    doc xmldom.DomDocument;
    fListe xmldom.DOMNodeList;
    tmpL xmldom.DOMNodeList;
    fElement xmldom.domNode;
    tmp xmldom.domNode;
    meldingId strliten;
    arg0_node xmldom.domnode;
    arg0_elmt xmldom.domelement;
    arg0_text xmldom.domtext;
    arg1_node xmldom.domnode;
    arg1_elmt xmldom.domelement;
    arg1_text xmldom.domtext;
    arg2_node xmldom.domnode;
    arg2_elmt xmldom.domelement;
    arg2_text xmldom.domtext;
    child_doc xmldom.domdocument;
    main_node xmldom.domnode;
    root_node xmldom.domnode;
    root_elmt xmldom.domelement;
    x sys.xmltype;
    c varchar2(32000);
    bs_chr strmax;
    l_service sys.UTL_DBWS.service;
    l_call sys.UTL_DBWS.call;
    l_result ANYDATA;
    l_wsdl_url strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean?wsdl';
    l_namespace strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean';
    l_service_qname sys.utl_dbws.qname;
    begin
    procName := 'hentQueue';
    pl('*************** '||procName||' ***************');
    svc_qname := sys.utl_dbws.to_qname(null, 'SIMSFacadeBeanService');
    svc_ := sys.utl_dbws.create_service(svc_qname);
    call_ := sys.utl_dbws.create_call(svc_);
    sys.utl_dbws.set_target_endpoint_address(call_, 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'sendMessage');
    sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'document');
    x := genererSvar;
    doc := xmldom.newDOMDocument;
    main_node := xmldom.makeNode(doc);
    root_elmt := xmldom.createelement(doc, 'q0:sendMessage');
    xmldom.setattribute(root_elmt, 'xmlns:q0', 'si.sims.intern.service');
    root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
    -- Adding arg 0 as a string
    arg0_elmt := xmldom.createelement(doc, 'arg0');
    arg0_node := xmldom.appendchild(root_node, xmldom.makenode(arg0_elmt));
    arg0_text := xmldom.createtextnode(doc, '2');
    arg0_node := xmldom.appendchild(arg0_node, xmldom.makenode(arg0_text));
                   -- Adding arg 1 as a string
    arg1_elmt := xmldom.createelement(doc, 'arg1');
    arg1_node := xmldom.appendchild(root_node, xmldom.makenode(arg1_elmt));
    arg1_text := xmldom.createtextnode(doc, x.getClobVal());
    arg1_node := xmldom.appendchild(arg1_node, xmldom.makenode(arg1_text));
    -- Adding arg 2 as a string
    arg2_elmt := xmldom.createelement(doc, 'arg2');
    arg2_node := xmldom.appendchild(root_node, xmldom.makenode(arg2_elmt));
    arg2_text := xmldom.createtextnode(doc, 'false');
    arg2_node := xmldom.appendchild(arg2_node, xmldom.makenode(arg2_text));
    request := xmldom.getxmltype(doc);
    pl('Request:');
    pl(request.getStringVal());
    response := sys.utl_dbws.invoke(call_, request);
    pl('Showing respons');
    pl(response.getStringVal());
    doc := DBMS_XMLDOM.newDomDocument(response);
    sys.utl_dbws.release_call(call_);
    sys.utl_dbws.release_service(svc_);
    end forwardToQueue;

    Is the Document well defined via schema? You might be able to use the autotype
    ant task to generate a serializer.
    Otherwise, serialize the document to a string, then wrap it in <[CDATA[...]]>
    on the return. The calling app will need to understand that the string is xml,
    and then desrailize it manually.
    Mike
    "Surya" <[email protected]> wrote:
    >
    I have web service which has to retuen an XML document (org.w3c.dom.Document)
    as
    a paramter. Since this is not a supported data type for in-out paramaters,
    I will
    have to serialize and write my own converter. What is the best solution?
    Is there
    any class/library that can convert the document into String which I can
    return
    as a parameter and again get create a XML document in the client side.
    Thanks -Surya

  • XML document structures must start and end within the same entity

    Hi there,
    I'm working with a client/server application and using SaxParser for reading in xml. I get the SaxParserException: XML document structures must start and end within the same entity. I understand what that means, but it isn't applicable! The xml data being used is well-formed. I checked the well-formedness with Stylus Studio to make sure. Here's the data:
    <?xml version='1.0' encoding='UTF-8'?>
    <vcmessage>
         <vcsource>3</vcsource>
         <processevent>16</processevent>
         <shape>
              <llindex>0</llindex>
              <shapetype>9</shapetype>
              <shapeproperties>
                   <shapelocation>
                        <xcoord>54</xcoord>
                        <ycoord>184</ycoord>
                   </shapelocation>
                   <bounds>
                        <width>24</width>
                        <height>24</height>
                   </bounds>
                   <fgcolor>
                        <fgred>0</fgred>
                        <fggreen>0</fggreen>
                        <fgblue>0</fgblue>
                   </fgcolor>
                   <bgcolor>
                        <bgred>255</bgred>
                        <bggreen>255</bggreen>
                        <bgblue>255</bgblue>
                   </bgcolor>
                   <thickness>1</thickness>
                   <isfilled>false</isfilled>
              </shapeproperties>
         </shape>
    </vcmessage>The parser generally stops around the </bgcolor> tag.
    I'm using Eclypse as my IDE. I'm wondering if there's something wrong with it? Or maybe there's something wrong with the class I'm using for reading in the XML? Followng is the class.
    Please advise,
    Alan
    package vcclient;
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import javax.xml.parsers.*;
    public class XMLDocumentReader extends DefaultHandler
      private VCClient client = null;
      private Writer out;
      private String lineEnd =  System.getProperty("line.separator");
      private boolean haveSourceType = false;
      private boolean haveUserName = false;
      private boolean haveMessage = false;
      private boolean haveProcessEvent = false;
      private boolean haveLinkedListIndex = false;
      private boolean haveOpeningShapePropertiesTag = false;
      private boolean haveShapeType = false;
      private boolean haveOpeningShapeLocationTag = false;
      private boolean haveShapeLocation = false;
      private boolean haveOpeningXCoordTag = false;
      private boolean haveOpeningYCoordTag = false;
      private boolean haveOpeningBoundsTag = false;
      private boolean haveBoundsWidth = false;
      private boolean haveBoundsHeight = false;
      private boolean haveOpeningFGColorTag = false;
      private boolean haveOpeningBGColorTag = false;
      private boolean haveOpeningThicknessTag = false;
      private boolean haveOpeningIsFilledTag = false;
      private boolean haveOpeningImageDataTag = false;
      private boolean haveOpeningTextDataTag = false;
      private boolean haveFGRed = false;
      private boolean haveFGGreen = false;
      private boolean haveFGBlue = false;
      private boolean haveBGRed = false;
      private boolean haveBGGreen = false;
      private boolean haveBGBlue = false;
      private boolean haveThickness = false;
      private boolean haveIsFilled = false;
      private boolean haveImageData = false;
      private boolean haveTextData = false;
      private VCMessage vcmessage = null;
      public XMLDocumentReader(VCClient value)
           client = value;
           vcmessage = new VCMessage();
      public VCMessage getVCMessage()
           return vcmessage;
      public boolean haveSourceType()
         return haveSourceType; 
      public boolean ParseXML(InputStream stream)
         boolean success = false;
         // Use the default (non-validating) parser
        SAXParserFactory factory = SAXParserFactory.newInstance();
        try
             // Set up output stream
            out = new OutputStreamWriter(System.out, "UTF-8");
            // Parse the input
            SAXParser saxParser = factory.newSAXParser();
            saxParser.parse( stream, this );
            success = true;
        catch (SAXParseException spe)
            // Error generated by the parser
            System.out.println("\n** Parsing error"
               + ", line " + spe.getLineNumber()
               + ", uri " + spe.getSystemId());
            System.out.println("   " + spe.getMessage() );
            // Unpack the delivered exception to get the exception it contains
            Exception  x = spe;
            if (spe.getException() != null)
                x = spe.getException();
            x.printStackTrace();
            return success;
        catch (SAXException sxe)
             // Error generated by this application
             // (or a parser-initialization error)
             Exception  x = sxe;
             if (sxe.getException() != null)
                 x = sxe.getException();
             x.printStackTrace();
             return success;
        catch (ParserConfigurationException pce)
            // Parser with specified options can't be built
            pce.printStackTrace();
            return success;
        catch (Throwable t)
             t.printStackTrace();
             return success;
        return success;
      public void startDocument()throws SAXException
          emit("<?xml version='1.0' encoding='UTF-8'?>");
          nl();
      public void endDocument()throws SAXException
          try {
              nl();
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      public void startElement(String namespaceURI,
                               String lName, // local name
                               String qName, // qualified name
                               Attributes attrs)throws SAXException
          String eName = lName; // element name
          if (eName.equals(""))
             eName = qName; // namespaceAware = false
          emit("<"+eName);
          if (attrs != null) {
              for (int i = 0; i < attrs.getLength(); i++) {
                  String aName = attrs.getLocalName(i); // Attr name
                  if (aName.equals("")) aName = attrs.getQName(i);
                  emit(" ");
                  emit(aName + "=\"" + attrs.getValue(i) + "\"");
          emit(">");
          if(makeStartTag(eName).equals(Constants.OPENING_SHAPEPROPERTIES))
                haveOpeningShapePropertiesTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_SHAPELOCATION))
              haveOpeningShapeLocationTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BOUNDS))
                haveOpeningBoundsTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_FGCOLOR))
                 haveOpeningFGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGCOLOR))
              haveOpeningBGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGGREEN))
               System.out.println("See BGGreen");
          else if(makeStartTag(eName).equals(Constants.OPENING_BGBLUE))
               System.out.println("See BGBlue");
          else if(makeStartTag(eName).equals(Constants.OPENING_THICKNESS))
              haveOpeningThicknessTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_ISFILLED))
              haveOpeningIsFilledTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_IMAGEDATA))
              haveOpeningImageDataTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_TEXTDATA))
              haveOpeningTextDataTag = true;
      public void endElement(String namespaceURI,
                             String sName, // simple name
                             String qName  // qualified name
                            )throws SAXException
           if(sName.equals("") && !qName.equals(""))
              sName = qName;
              emit("</"+sName+">");
           else
              emit("</"+sName+">");
           if(makeEndTag(sName).equals(Constants.CLOSING_SOURCE_TYPE))
              haveSourceType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_USER))
              haveUserName = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_MESSAGE))
              haveMessage = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_PROCESSEVENT))
               haveProcessEvent = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_LINKEDLISTINDEX))
               haveLinkedListIndex = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPETYPE))
               haveShapeType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPELOCATION))
                haveOpeningShapeLocationTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_WIDTH))
               haveBoundsWidth = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_HEIGHT))
               haveBoundsHeight = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BOUNDS))
                haveOpeningBoundsTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGRED))
               haveFGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGGREEN))
               haveFGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGBLUE))
               haveFGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGCOLOR))
                haveOpeningFGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGRED))
               haveBGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGGREEN))
             haveBGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGBLUE))
               System.out.println("See closing BGBlue");
               haveBGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGCOLOR))
                haveOpeningBGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_THICKNESS))
               System.out.println("XMLDocumentReader: Step2");
                haveOpeningThicknessTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_ISFILLED))
               haveOpeningIsFilledTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_IMAGEDATA))
               haveOpeningImageDataTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_TEXTDATA))
               haveOpeningTextDataTag = false;
      private String makeStartTag(String tag_name)
           String start = "<";
           String end = ">";
           return start.concat(tag_name).concat(end);
      private String makeEndTag(String tag_name)
           String start = "</";
           String end = ">";
           return start.concat(tag_name).concat(end);
      public void characters(char buf[], int offset, int len)throws SAXException
           String s = new String(buf, offset, len);
          if(haveSourceType == false)
               if(vcmessage.getSourceType() == null)
                  try
                    if(s.equals(""))return;
                   int sourcetype = Integer.parseInt(s);
                   vcmessage.setSourceType(sourcetype);                            
                  catch(NumberFormatException nfe){}
          else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE)
            if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveUserName == false)
                 vcmessage.setUserName(s);          
            else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveMessage == false)
               //When the parser encounters interpreted characters like: & or <,
               //then this method gets invoked more than once for the whole message.
               //Therefore, we need to concatonate each portion of the message.  The
               //following method call automatically concatonates.
               vcmessage.concatMessage(s);                    
          else if(vcmessage.getSourceType() == SourceType.WHITEBOARD_SOURCE)
               if(haveProcessEvent == false)
                 try
                   vcmessage.setProcessEvent(Integer.parseInt(s));
                 catch(NumberFormatException nfe){}
               else if(haveLinkedListIndex == false)
                    try
                       vcmessage.setLinkedListIndex(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               else if(haveShapeType == false)
                    try
                       vcmessage.setShapeType(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               if(haveOpeningShapePropertiesTag)
                    if(haveOpeningShapeLocationTag)
                         if(haveOpeningXCoordTag)
                              try
                                vcmessage.setXCoordinate(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveOpeningYCoordTag)
                              try
                                vcmessage.setYCoordinate(Integer.parseInt(s));
                                //reset all flags for ShapeLocation, X and Y coordinates
                                haveOpeningXCoordTag = false;
                                haveOpeningYCoordTag = false;
                                //haveOpeningShapeLocationTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBoundsTag)
                         if(haveBoundsWidth == false)
                              try
                                vcmessage.setBoundsWidth(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveBoundsHeight == false)
                              try
                                vcmessage.setBoundsHeight(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBoundsTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningFGColorTag)
                         if(haveFGRed == false)
                              try
                                vcmessage.setFGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGGreen == false)
                              try
                                vcmessage.setFGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGBlue == false)
                              try
                                vcmessage.setFGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningFGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBGColorTag)
                         if(haveBGRed == false)
                              try
                                vcmessage.setBGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGGreen == false)
                              try
                                vcmessage.setBGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGBlue == false)
                         {   System.out.println("getting BGBlue data");
                              try
                                vcmessage.setBGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningThicknessTag)
                         try
                            vcmessage.setThickness(Integer.parseInt(s));                       
                          catch(NumberFormatException nfe){}
                    else if(haveOpeningIsFilledTag)
                         vcmessage.setIsFilled(s);
                    else if(haveOpeningImageDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setBase64ImageData(s);                    
                    else if(haveOpeningTextDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setTextData(s);
                    //reset
                    haveOpeningShapePropertiesTag = false;
          emit(s);
      //===========================================================
      // Utility Methods ...
      //===========================================================
      // Wrap I/O exceptions in SAX exceptions, to
      // suit handler signature requirements
      private void emit(String s)throws SAXException
          try {
              out.write(s);
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      // Start a new line
      private void nl()throws SAXException
          try {
              out.write(lineEnd);
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      //treat validation errors as fatal
      public void error(SAXParseException e)
      throws SAXParseException
        throw e;
      // dump warnings too
      public void warning(SAXParseException err)
      throws SAXParseException
        System.out.println("** Warning"
            + ", line " + err.getLineNumber()
            + ", uri " + err.getSystemId());
        System.out.println("   " + err.getMessage());
    }

    Just out of curiosity what happens if you append a space to the end of the XML document?

  • Creating new analysis gives "Error loading XML Document from ..."

    Trying to create analysis and getting "Error loading XML Document from saw.dll/answers/answersproperties.xml?fmapId=S1clug.
    The response given was:" after choosing subject area. Analysis editor is opened but Subject Areas is empty and can't do anything.
    The problem is on Mozilla 12 (16.0.2, 17.0.1) and IE 8. Chrome works fine.
    My system is Win 7, BI 11.1.1.6.0 is on Oracle Linux (and by the way Mozilla from Linux system works fine)
    What could be the reason of this?
    Edited by: 898973 on 4/12/2012 15:11

    Reinstalling Mozilla with "Remove personal data" option checked resolved the problem.

  • XML document as a parameter while accessing web service

    I have web service which has to retuen an XML document (org.w3c.dom.Document) as
    a paramter. Since this is not a supported data type for in-out paramaters, I will
    have to serialize and write my own converter. What is the best solution? Is there
    any class/library that can convert the document into String which I can return
    as a parameter and again get create a XML document in the client side.
    Thanks -Surya

    Is the Document well defined via schema? You might be able to use the autotype
    ant task to generate a serializer.
    Otherwise, serialize the document to a string, then wrap it in <[CDATA[...]]>
    on the return. The calling app will need to understand that the string is xml,
    and then desrailize it manually.
    Mike
    "Surya" <[email protected]> wrote:
    >
    I have web service which has to retuen an XML document (org.w3c.dom.Document)
    as
    a paramter. Since this is not a supported data type for in-out paramaters,
    I will
    have to serialize and write my own converter. What is the best solution?
    Is there
    any class/library that can convert the document into String which I can
    return
    as a parameter and again get create a XML document in the client side.
    Thanks -Surya

  • [JS][CS3] Trying to use XSL to transform a XML document

    I´m trying to do a script to format my XML in a particular way. The XSL document is ok because I´ve used this document to format an XML document in Indesign CS3 and works fine.However, when I´m trying to use this document in my scripting method I can´t obtain my XML formatted. I´ve tried it many times but I really don´t know where is the problem.
    I´ve changed the XMLExportPreferences (allowTransform,TransformFileName)in my scripting method before exporting my XML in order to obtain a formatted XML.
    Anyone have any idea? What are the steps to make this work?
    Thank u,
    Peter

    I'm having a similar problem but with importing XML. When I run this script I get a dialogue saying that "Stylesheet 'Macintosh HD:Users:myFolder:transform.xsl, specified in the XSLT processing instruction can not be found." But this is the location of the stylesheet??
    Here's the entire script (a combination of Adobe samples):
    main();
    function main(){
    mySetup();
    mySnippet();
    function mySetup(){
    var myDocument = app.documents.add();
    var myRootXMLElement = myDocument.xmlElements.item(0);
    var myXMLTag = myDocument.xmlTags.add("body");
    var myXMLElement = myDocument.xmlElements.item(0).xmlElements.add(myXMLTag);
    myDocument.select(myXMLElement);
    //Sets XML import options.
    var myXMLImportPreferences = myDocument.xmlImportPreferences;
    myXMLImportPreferences.createLinkToXML = false;
    myXMLImportPreferences.ignoreUnmatchedIncoming = false;
    myXMLImportPreferences.ignoreWhitespace = true;
    myXMLImportPreferences.importCALSTables = true;
    myXMLImportPreferences.importStyle = XMLImportStyles.mergeImport;
    myXMLImportPreferences.importTextIntoTables = false;
    myXMLImportPreferences.importToSelected = true;
    myXMLImportPreferences.removeUnmatchedExisting = false;
    myXMLImportPreferences.repeatTextElements = true;
    myXMLImportPreferences.allowTransform = true;
    myXMLImportPreferences.transformFilename = File("/Users/myFolder/transform.xsl");
    myDocument.importXML(File("/Users/myFolder/document.xml"))
    function mySnippet(){
    var myDocument = app.documents.item(0);
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
    myDocument.xmlElements.item(0).xmlElements.item(0).placeIntoFrame(myDocumen pages.item(0), [35, 35, 758, 576]);

  • How to get the resulting XML as string

    Hello,
    I think my question is very simple but i'm new in this area.
    What i'm try to do is to parse a XML document with the DOM parser. Then i manipulate the DOM tree. After finishing the process i want to get the resulting XML document as an InputStream to give to another application for storing back into the database.
    Until know i print the resulting XML to System.out or I write it to a file.
    Do you know where i can find more information about this? Sample code??
    Thanks!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    You can try following code. It is not the simplest way, but it works for me:
    // Print to temp buffer
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream output = new DataOutputStream(baos);
    Xml_doc.print(output);
    String outtemp=baos.toString();
    System.out.println(outtemp);
    include following line for the lib:
    import java.io.*;<HR></BLOCKQUOTE>
    Many thanks for the reply. It works!

  • Reading a large file?  I created an Applescript to read an XML document...

    I created an Applescript to read an XML document that had been exported from Final Cut Pro but it has trouble reading anything larger than a 1mb. Even 500kb takes a long time.
    My code is most likely very ineffecient, but I have little experience with Applescript. The script reads an XML document one line at a time then breaks down each line into it's componenents and literally reads each character looking for "<name>" then it checks to see if "<reel>" came before it. It then records the name in between "<name>" and "</name>." Then I get my list of tapes that are in the Final Cut Pro project. Does anyone have any advice on how to improve this code?
    property type_list : {"TEXT", "XML"}
    property extension_list : {"TXT", "XML"}
    on open these_items
    tell application "Finder"
    set my_file to these_items as string
    set file_ref to (open for access my_file) read
    close access file my_file
    set AppleScript's text item delimiters to ASCII character 10
    set new_list to every text item of file_ref
    set lengthofarray to length of new_list
    set h to 1
    set shotcount to 0
    set finalShots to {"You have ", "", " shots in your project."}
    set finalListoftapes to {"Your list of tapes are:", ""}
    repeat lengthofarray times
    set i to 1
    set x to 1
    set switch to 0
    set z to {""}
    set reelName to {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}
    set letter_list to item h of new_list
    set AppleScript's text item delimiters to ""
    set final_list to every text item of letter_list
    set lengthofletter_list to length of final_list
    repeat lengthofletter_list times
    if item i of final_list is "<"a" then
    if item (i + 3) of final_list is "m" then
    set letter_list2 to item (h - 1) of new_list
    set final_list2 to every text item of letter_list2
    set lengthofletter_list2 to length of final_list2
    set j to 1
    repeat lengthofletter_list2 times
    if item j of final_list2 is "<" then
    if item (j + 1) of final_list2 is "r" then
    if item (j + 2) of final_list2 is "e" then
    set x to (i + 6)
    set y to 1
    repeat while item 1 of z is not "<"
    set item y of reelName to item x of final_list
    set x to (x + 1)
    set y to (y + 1)
    set item 1 of z to item x of final_list as string
    end repeat
    if item 1 of reelName is not "" then
    set displayText to reelName as string
    set lengthofListoftapes to length of finalListoftapes
    set shotcount to (shotcount + 1)
    set k to 1
    repeat lengthofListoftapes times
    if item k of finalListoftapes is equal to displayText then
    set switch to 1
    end if
    set k to (k + 1)
    end repeat
    if switch is 0 then
    set finalListoftapes to (finalListoftapes & displayText)
    set check to finalListoftapes as string
    end if
    set switch to 0
    end if
    end if
    end if
    end if
    set j to (j + 1)
    end repeat
    end if
    end if
    end if
    end if
    set i to (i + 1)
    end repeat
    set h to (h + 1)
    end repeat
    set item 2 of finalShots to shotcount
    set finalShots to finalShots as string
    set AppleScript's text item delimiters to ASCII character 10
    set finalListoftapes to finalListoftapes as string
    set finalListoftapes to finalShots & (ASCII character 10) & (ASCII character 10) & finalListoftapes & (ASCII character 10) & (ASCII character 10) & "This list of tapes has been saved on your desktop."
    set path_list to these_items as string
    set filepath to path_list & "_listoffiles.txt"
    set outputFile to (open for access file filepath with write permission)
    write finalListoftapes to outputFile
    close access outputFile
    display dialog finalListoftapes
    end tell
    end open

    Try changing your approach - don't read it into an array, process it one line at a time. Obviously any approach where you have the whole file in memory is going to exceed memory at some size of the file.

  • Error loading XML Document from /analytics/saw.dll/common/privileges.xml

    I tested my procedure for upgrading from OBI 11.1.1.5 to 11.1.1.6 which was successful. I had to rollback to OBI 11.1.1.5 using my database backup and VM snapshot due to project requirements.
    The OBI application successfully comes up but users who login just get "Error loading XML Document from /analytics/saw.dll/common/privileges.xml?fmapID=KqIJCw. The response given was: ". They can't close this message box so are unable to do anything.
    How can I fix this?

    Hi All,
    You can face this issue with other versions of OBIEE 11.*
    Problem cab be solved as follows:
    Go to http://localhost:7001/em  > coreapplication > Capacity Management > Scalibility >
    1. Lock and edit
    2 .increase number of presentation services to 2
    3. restart opmn component.
    Go to coreapplication > Availibility > processes
    1 .please note that in deployment > catalog > change path of catalog field from $coreapplication to path where your catalog resides.
    2. Take down your primary instance.
    3. As your secondary is up, it will grant you to browse you through catalog and dashboards.
    If you want to run primary instance of presentation services
    Go to path \Middleware\instances\instance1\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips2
    except catalog and catalog manager > Copy all other files to coreapplication_obips1
    restart opmn component > problem solved.!!!
    Regards,
    Akshay S.
    please like if you find it helpful

  • Xml document parser

    I have the java source code for a SAX compiler to parse my XML document.
    To make this work I was told to include the following in my classpath: -
    �     j2sdk1.4.1_01/jaxp-1.1/jaxp.jar
    �     j2sdk1.4.1_01/jaxp-1.1/xalan.jar
    �     j2sdk1.4.1_01/jaxp-1.1/crimson.jar
    by the way I have got j2sdk1.4.1_01!!
    I have also got another java file which is a java class that calls my parser.java file. When I compile the java class file I get weird errors such as:
    "Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.3', but '1.4' is required.
    ERROR: could not find java.dll
    ERROR: could not find Java 2 Runtime Environemnt.
    This is the code for my java class:
    import java.io.*;
    import java.util.*;
    public class testXML {
    public static void main(final String[] pArgs) throws IOException {
    new CustomerParser("flock.xml");
    I'm pretty new to this parsing business, and Im really not sure what to do.
    1)is it my java software playing up?
    2)or is it my classpath?
    3)or what?
    hope someone can help, Jim.

    Find the old version of java.exe that's running and get rid of it. (or remove the pathe entry)

Maybe you are looking for

  • Why is there stitching in Acrobat?

    I(email address removed by host) This book cover is in a series, but it's the first time I have encountered this problem. The cover (like several others) has black and a PMS color, plus a wave in a tint of the same color with a black drop shadow (in

  • FileVault Yosemite: 22 days to encrypt?! HELP!!!

    So, against my better judgement, I decided to do the FileVault option once I installed Yosemite. BIG MISTAKE. Not only is it eating my memory and making my Mac slow, it says that it's going to take 22 days to encrypt!!! HOW CAN I DO A KILL SWITCH TO

  • Oracle Attunity CDC Connectivity issue

    Hi All, I am using "CDC Designer for Oracle by Attunity" tool to configure CDC in Oracle .  I am working with Oracle RAC Database . Please let me know what should be connection string to be used ? Tnsnames.ora file has below entry : DWTST_TAF = (DESC

  • Dead in the Wa

    Hello, and thanks in advance for any help you can provide. No one answers the phone at the free support line--I have let it ring 200 times three different times. Here's where I am: Zen Micro Win XP Downloaded music from Napster. Got a pop-up that sai

  • In Preferences I've chosen to have Firefox ask me before installing updates--but instead Firefox has installed updates without asking.

    Just now I returned to my laptop to discover that Firefox had installed an update. The only option I was given was to restart now or later. I checked my preferences, and I definitely have them set to have FF ask me before installing.