Simple XML question

org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
I'm sure many of you you know exactly what causes this exception. Could you please help me with this one.
Here is some background info:
I'm using NetBeans IDE, with xerces.jar mounted (so it should be available). Here is the source code, that parses the file:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(
new java.io.File(this.resourceLocation)); //<-- Exception !!
Here is the (simplified) xml-file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configuration SYSTEM "params.dtd">
<Something>
<firstConfig>
<someAttr a="a" b="b" c="c" />
<someOtherAttr h="h" i="i" j="j" />
</firstConfig>
<secondConfig>
<attr name="name" value="value" />
</secondConfig>
</Something>
I created a dtd from this xml with NetBeans' dtd-wizard.
The xml-file is at the same directory as the compiled class-files and so is the dtd.
What could cause this exception to occur?!?
Thank you in advance,
-J-

Hi, not well formed, means that your xml does not match your DTD!
Obviously the root Element must be
<Configuration> and not <Something> according to your Doctype deklaration.
But in general, it's very useful to override the normal
ErrorHandler (like this):
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXParseException;
import org.xml.sax.SAXException;
/** Just extends the normal ErrorHandler to display the kind of error and the linenumber.
*  The column-number is displayed too, but it is normally not so usefull.
*  So its much easier to debug files.
public class SAXErrorHandler implements ErrorHandler {
    public SAXErrorHandler() {
    public void error(SAXParseException parm1) throws org.xml.sax.SAXException {
        System.err.println("Error");
        System.err.println( parm1.getLineNumber() +"\t"+ parm1.getColumnNumber() +"\t"+ parm1.getSystemId() +"\t"+ parm1.getMessage());
    public void fatalError(SAXParseException parm1) throws org.xml.sax.SAXException {
        System.err.println("FatalError");
        System.err.println( parm1.getLineNumber() +"\t"+parm1.getColumnNumber()+"\t"+parm1.getSystemId() +"\t"+parm1.getMessage());
    public void warning(SAXParseException parm1) throws org.xml.sax.SAXException {
        System.err.println("Warning");
        System.err.println( parm1.getLineNumber() +"\t"+parm1.getColumnNumber()+"\t"+parm1.getSystemId() +"\t"+parm1.getMessage());
        parm1.printStackTrace();
}Than add an new instance of this class to the DocumentBuilder.
builder.setErrorHandler(new SAXErrorHandler());So you will be able to figure out at least the line of code, which causes the problem.
Hope this helps.
Greetings Michael

Similar Messages

  • Very simple XML question

    1. I have a simple table with a clob to store an unlimited number of contacts as follows ....
    CREATE TABLE MY_CONTACT (USER_id NUMBER, All_Contacts SYS.XMLTYPE );
    2. I inserted 1 user with 2 contacts as follows :
    INSERT INTO MY_CONTACT
    VALUES(1, sys.XMLType.createXML('<?xml version="1.0"?>
    <CONTACT>
    <CONTACTID ID="1">
    <FNAME>John</FNAME>
    <MI>J</MI>
    <LNAME>Doe</LNAME>
    <RELATIONSHIP> </RELATIONSHIP>
    <ADDRESS>
    <STREET>1033, Main Street</STREET>
    <CITY>Boston</CITY>
    <STATE>MA</STATE>
    <ZIPCODE>02118</ZIPCODE>
    </ADDRESS>
    </CONTACTID>
    <CONTACTID ID="2">
    <FNAME>Carl</FNAME>
    <MI>J</MI>
    <LNAME>Davis</LNAME>
    <RELATIONSHIP>Son</RELATIONSHIP>
    <ADDRESS>
    <STREET>1033, Main Street</STREET>
    <CITY>San Francisco</CITY>
    <STATE>CA</STATE>
    <ZIPCODE>06456</ZIPCODE>
    </ADDRESS>
    </CONTACTID>
    </CONTACT>'));
    --- 1 row inserted .
    I have the the following issues :
    3. When I run the following :
    select A.All_Contacts.extract('/CONTACT/CONTACTID/@ID').getnumberval() ID,
    A.All_Contacts.extract('/CONTACT/CONTACTID/FNAME/text()').getstringval() FNAME,
    A.All_Contacts.extract('/CONTACT/CONTACTID/LNAME/text()').getstringval() LNAME
    from MY_CONTACT A ;
    I was hoping this query would return :
    ID FNAME
    1 John
    2 Carl
    But instead, I am getting : .... How do I fix the query to get the results I am looking for ( above) ?
    ID FNAME
    12 JohnCarl
    4. I have another query :
    select A.All_Contacts.extract('/CONTACT/CONTACTID/@ID').getnumberval() ID,
    A.All_Contacts.extract('/CONTACT/CONTACTID/FNAME/text()').getstringval() FNAME,
    A.All_Contacts.extract('/CONTACT/CONTACTID/LNAME/text()').getstringval() LNAME
    from MY_CONTACT A
    where
    A.All_Contacts.extract('/CONTACT/CONTACTID/@ID').getstringval() = 1;
    that returns no rows at all !!!
    How do I get the query to return only the first set of values for CONTACTID ID=1 ? :
    ID FNAME
    1 John
    I hope this is easy to fix - my aim is to store up to ten contacts in the clob, but I cant't even get it to work with just 2 contacts ...
    Any help would be greatly appreciated.
    Thanks !!!

    If you are on 10g (I think at least 10.2.x.x) or greater, then you can also use the following. I prefer XMLTable over the table(xmlsequence()) structure.
    SELECT cid, fname, lname
      FROM MY_CONTACT A,
           XMLTABLE('CONTACT/CONTACTID'
                    PASSING A.All_contacts
                    COLUMNS
                    cid    NUMBER PATH '@ID',
                    fname  VARCHAR2(20) PATH 'FNAME',
                    lname  VARCHAR2(20) PATH 'LNAME')
    WHERE cid = 1;
          

  • NewBie's Simple XML Question

    Hi Friends,
    I am starting to learn "xml"..got the complete reference book.But can someone please tell me how to start with it.i have a *.xml file and a *.xsl file.I am trying to call the xml file in my browser..but the xml file contents shows up..with no xsl formatting options applied.Can someone please tell me or show me the rite way to accomplish this.
    Thanks
    Mick

    http://www.w3schools.com/xsl/xsl_transformation.asp

  • A really simple XML Question

    i want to use XML to save some configuration for elements in my app.
    in my example i want to add 6 additional configuration sets to one "main" XML. each set can be config1 or config2.
    In this case i added 3x config1 and 3x config2. if i trace my results i do not only get the wrong order of elements but also some "strange" binding behavior.
    Of course this is a simplified example. my configuration sets are more complex (this is why i use seperate xml-objects for each config).
    Can someone tell me how this is supposed to work ?
    thanks,
    quadword
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160" creationComplete="init();">
      <fx:Declarations>
      <fx:XML id="mainConfig" format="e4x">
              <allConfigSets>
                        <viewconfig>Baseconfig</viewconfig>
              </allConfigSets>
      </fx:XML>
      <fx:XML id="configSet1" format="e4x">
              <configSet><viewconfig>Set1</viewconfig></configSet>
      </fx:XML>
      <fx:XML id="configSet2" format="e4x">
              <configSet><viewconfig>Set2</viewconfig></configSet>
      </fx:XML>
      </fx:Declarations>
      <fx:Script>
                        <![CDATA[
                                  private function init(): void {
                                            mainConfig.appendChild(configSet1.viewconfig);
                                            mainConfig.appendChild(configSet1.viewconfig);
                                            mainConfig.appendChild(configSet1.viewconfig);
                                            mainConfig.appendChild(configSet2.viewconfig);
                                            mainConfig.appendChild(configSet2.viewconfig);
                                            mainConfig.appendChild(configSet2.viewconfig);
                                            // trace1 (see below): trace shows wrong order of elements
                                            trace (mainConfig);
                                            // trace2:(see below): changing data on original configSet seems to bind into mainConfig
                                            configSet1.viewconfig = "-";
                                            trace (mainConfig);
                        ]]>
      </fx:Script>
    </s:Application>
    Trace1:
    <allConfigSets>
      <viewconfig>Baseconfig</viewconfig>
      <viewconfig>Set1</viewconfig>
      <viewconfig>Set2</viewconfig>
      <viewconfig>Set2</viewconfig>
      <viewconfig>Set2</viewconfig>
      <viewconfig>Set1</viewconfig>
      <viewconfig>Set1</viewconfig>
    </allConfigSets>
    Trace2:
    <allConfigSets>
      <viewconfig>Baseconfig</viewconfig>
      <viewconfig>-</viewconfig>
      <viewconfig>Set2</viewconfig>
      <viewconfig>Set2</viewconfig>
      <viewconfig>Set2</viewconfig>
      <viewconfig>-</viewconfig>
      <viewconfig>-</viewconfig>
    </allConfigSets>

    mainConfig.appendChild(configSet1.viewconfig.toString());
    This will make it work.

  • Simple query question

    hi all,
    I have a XMLType table with one column - I have presently one row, in my column xmlsitedata I have stored one large xml file.The schema definition is given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    - <xs:element name="siteList">
    - <xs:complexType>
    - <xs:sequence>
    <xs:element name="site" type="siteType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    - <xs:complexType name="siteType">
    - <xs:sequence>
    <xs:element name="nameEn" type="xs:string" />
    <xs:element name="nameFr" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="code" type="xs:string" />
    </xs:complexType>
    </xs:schema>
    I have executed the query below:
    select x.XMLSITEDATA.extract('/siteList/site/nameEn/text()').getCLOBVal() "stName" from wsitelist x;
    and I get all english names of some 200 locations, however, there is 1 row selected and all names show up on one row. How do I split them into 200 or whatever rows?
    Thanks,
    Kowalsky

    Have a look at the answer provided in the following thread.
    very simple XML question
    This may solve your problem.
    use xmlsequence.
    Alvinder

  • Change over from a simple Xml call to a rpc-Http call ....

    Hi there,
    I need to change over from a simple Xml call:
    <mx:XML id="urlsGeneral" source="http://www.mySite.com//.../AFS.xml"/>
    to a rpc-Http call which is updating the readout if Xml is changed at any time.
    I forgot to mention the most important item yet a very simple one: I need this only to be displayed in a title etc, and NOT a datagrid or else example below.
    title="{urlsGeneral.urlGeneral.(@name==0).age}
    I tried a lot today, but just can't get it right as the id="urlsGeneral" is always the problem.
    Any help would be appriciated !!! Thanks in advance. regards aktell2007
    <urlsGeneral>
    <urlGeneral>
    <name>Jim</name>
    <age>32</age>
    </urlGeneral>
    <urlGeneral>
    <name>Jim</name>
    <age>32</age>
    </urlGeneral>
    </urlsGeneral>
    Another call:
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    public var myData:ArrayCollection;
    protected function myHttpService_resultHandler(event:ResultEvent):void {
    myData = event.result.urlsGeneral.urlGeneral;
    ]]>
    </mx:Script>
    <mx:HTTPService
    id="myHttpService"
    url="http://www.mySite.com//..../AFS.xml"
    result="myHttpService_resultHandler(event)"/>
    Preferable I wanted something like this to work:
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.FaultEvent;
    import mx.managers.CursorManager;
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.xml.SimpleXMLDecoder;
    // Don't use here as it is already used in .swc !
    /* import mx.rpc.http.HTTPService; */
    private var myHTTP:HTTPService;
    private function initConfigCall():void {
    myHTTP = new HTTPService();
    myHTTP.url = "com/assets/data/changesAppAIRPIOne001.xml";
    myHTTP.send();
    myHTTP.resultFormat = "xml";
    myHTTP.addEventListener(ResultEvent.RESULT, resultHandler);
    myHTTP.addEventListener(FaultEvent.FAULT, faultHandler);
    CursorManager.setBusyCursor();
    private function resultHandler(evt:ResultEvent):void {
    var xmlStr:String = evt.result.toString();
    var xmlDoc:XMLDocument = new XMLDocument(xmlStr);
    var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
    var resultObj:Object = decoder.decodeXML(xmlDoc);
    // Removed [0] on single node !
    appUpdateAvl.text = resultObj.application.configApp.appNewUpDate;
    appLastChanged.text = resultObj.application.configApp.appLastChanged;
    appChangedSections.text = resultObj.application.configApp.appChangedSections;
    CursorManager.removeBusyCursor();
    myHTTP.disconnect();
    private function faultHandler(event:mx.rpc.events.FaultEvent):void {
    var faultInfo:String="fault details: "+event.fault.faultDetail+"\n\n";
    faultInfo+="fault faultString: "+event.fault.faultString+"\n\n";
    mx.controls.Alert.show(faultInfo,"Fault Information");
    var eventInfo:String="event target: "+event.target+"\n\n";
    eventInfo+="event type: "+event.type+"\n\n";
    mx.controls.Alert.show(eventInfo,"Event Information");
    CursorManager.removeBusyCursor();
    myHTTP.disconnect();
    ]]>
    </mx:Script>

    Hi again,
    These days there are more quetions than answeres on any forum, and very seldom anybody shares the answer if they lucky enough to work it out so here is my answer for the above question
    Change over from a simple Xml call to a rpc-Http call ....
    I had it all along as a commend noted: // Removed [0] on single node !
    So instead of title="{urlsGeneral.urlGeneral.(@name==0).age} it would be now title="{resultObj.urlsGeneral.urlGeneral.[0].age} and now it works perfectly well. I hope that one or the other of you can use the answer and the code !!! regards aktell2007

  • How can we convert soap wrapped xml to simple xml?

    I am getting a soap wrapped xml as payload to JMS in JMS queue and need to convert that into a simple xml. Can anyone please suggest how this can be done? I am adding the xml as an attachment.
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/">
    <SOAP-ENV:Body>
    <setupXMLDataAcquisitionRequest xmlns="http://capabilities.nat.bt.com/xsd/ManageMISDataAcquisition/2007/06/30" xmlns:S18="http://capabilities.nat.bt.com/xsd/ManageMISDataAcquisition/2007/06/30/CCM/Activities" xmlns:S70="http://capabilities.nat.bt.com/xsd/ManageMISDataAcquisition/2007/06/30/CCM/Events" xmlns:S78="http://capabilities.nat.bt.com/xsd/ManageMISDataAcquisition/2007/06/30/CCM/Incidents" xsi:schemaLocation="http://capabilities.nat.bt.com/xsd/ManageMISDataAcquisition/2007/06/30
    D:\Jay_137788\OffshoreCode\WSDLandXSD\WSDLandXSD\ManageMISDataAcquisition.20070630.xsd">
    <header:standardHeader>
    <header:e2e>
    <header:E2EDATA>e2EData</header:E2EDATA>
    </header:e2e>
    <header:serviceState>
    <header:stateCode>OK</header:stateCode>
    </header:serviceState>
    <header:serviceAddressing>
    <header:from>http://ccm.intra.bt.com/neo</header:from>
    <header:to>
    <header:address>http://ccm.intra.bt.com/orbit</header:address>
    <header:contextItemList>
    <header:contextItem contextId="http://ccm.intra.bt.neo" contextName="serviceType">WLR</header:contextItem>
    </header:contextItemList>
    </header:to>
    <header:messageId>http://ccm.intra.bt.com/neo/manageMISDataAcquasition/EC9DB800-5C5F-11DC-AECA-E60BE61DBC5B</header:messageId>
    <header:serviceName>http://ccm.intra.bt.com/manageMISDataAcquasition</header:serviceName>
    <header:action>http://ccm.intra.bt.com/manageMISDataAcquasition/2007/08#problemMISEventNotification</header:action>
    </header:serviceAddressing>
    <header:serviceSpecification>
    <header:payloadFormat>XML</header:payloadFormat>
    <header:version>1.0</header:version>
    </header:serviceSpecification>
    </header:standardHeader>
    <activity>
    <S18:Event>
    <S70:id>KPI.SA.dispatchActionItem</S70:id>
    <S70:eventDateTime>2007-09-06T15:29:56</S70:eventDateTime>
    </S18:Event>
    <S18:activityId>000000109</S18:activityId>
    <S18:activityType>WFT</S18:activityType>
    <S18:activityCode>BBHC5</S18:activityCode>
    <S18:activityStatus>Not Started</S18:activityStatus>
    <S18:activityCondition>Not Started-Dispatch</S18:activityCondition>
    <S18:activityDateCreated>2007-09-06T16:30:36</S18:activityDateCreated>
    <S18:activityDateCompleted>1753-01-01T00:00:00</S18:activityDateCompleted>
    <S18:activityQueueID>ASG</S18:activityQueueID>
    <S18:activityNote>
    <S18:comment>Customer Apparatus SFI for BBHC5</S18:comment>
    </S18:activityNote>
    <S18:activityOwner>sa</S18:activityOwner>
    <S18:activityAccessURL />
    <S18:faultIdentifier>
                                                 <S78:name>faultId</S78:name>
                                                 <S78:value>NeoSAC00000041</S78:value>
    </S18:faultIdentifier>
    <S18:activityRelatedTo>Action Request</S18:activityRelatedTo>
    </activity>
    </setupXMLDataAcquisitionRequest>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    I take that to mean "Yes" to the first question and a failure to answer the second.
    I don't know anything about SOAP, but that shouldn't matter because you're just asking a general question about XML. I assume that "the message in the body" must correspond to something in that XML you posted? Right? When I look at it I don't see anything that looks much like a message, but then I don't know anything about SOAP.

  • How to create simple XML database in oracle 11g

    Hi,
    what are the steps to followed to create a simeple custormer XML database.
    Like storing .xml file into XMLType, writing simple xml schema.....like that
    how to register the .xsd
    how to insert the xml data
    how to querying the the data base with xquery
    Thanks in Advance

    Have a look a the FAQ on the main page of this XMLDB forum. That's a good source to start (besides the XMLDB Developer Guide manual).

  • Flat File to simple XML structure in Mail Sender Adapter

    Hi,
    I have a scenario, where I want to put the content of a flat file (text, no csv or similar), which is an attachement of an e-mail, into a simple XML structure: entire file content as content of one XML tag. E.g.:
    file content:
    "abcdefgh"
    xml file:
    <root>
      <content>abcdefgh</content>
    </root>
    Do I need to use MessageTransformBean? Or is there an easiert way?
    Thanks,
    Torsten

    Hi Dirk,
    When we use MessageTransform, we can use ContentDisposition to specify, as to whether the payload has to go as an attachment or inline(as the mail itself.)
    It could also be a text file. Right?
    Just take a look at this..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
    cheers,
    Prashanth

  • Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Just a suggestion..........
    Download Thunderbird.  Easier to use when it comes to what you want to do w/your emails. 

  • Creating a very simple XML-driven gallery

    Hi, I'm learning XML in AS3 and I am having real trouble finding a resource that can help me learn how to build a very simple XML-driven picture gallery.
    I am working in an FLA file with AS3, with a dynamic text field with the instance name "textfield". I also have a UILoader Component with the instance name "UILoaderComponent" and an XML file called "rootdir.xml".
    I have an XML file in the following format.
    <images>
         <imagenames>
              <name>image1</name>
              <name>image2</name>
              <name>image3</name>
              <name>image4</name>
              <name>image5</name>
         </imagenames>
         <imagepaths>
              <path>image1.jpg</path>
              <path>image2.jpg</path>
              <path>image3.jpg</path>
              <path>image4.jpg</path>
              <path>image5.jpg</path>
         </imagepaths>
    </images>
    I am using the following as my actionscript.
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("rootdir.xml"));
    function LoadXML(e:Event):void {
    xmlData = new XML(e.target.data);
    parseImg(xmlData);
    function parseImg(imgLoad:XML):void {
    var imgChild:XMLList = imgLoad.images.children();
    for each (var imgTrace:XML in imgChild) {
    trace(imgTrace);
    No matter which way I experiment, I always have poor results with my dynamic text, and every tutorial I've followed does not reproduce anything like the same returned data in "textfield" that it does with the trace command.
    My objective is: I simply want to build a menu inside a textbox called "textfield" that lists images1-5, and when clicked, calls upon the relevant image. For instance: I load the file "rootdir.xml" into the file "index.fla". I call a function to parse the XML into a dynamic text box called "textfield". When image 2 is clicked on the textbox "textfield", it would call upon a function that would load into the UIComponent Loader "image2.jpg".
    Are there any tutorials for this? I'm so confused as to why dynamic text operates so differently from the trace command. I'm not interested in doing a fancy menu bar with thumbnails, scrollbars and animations, I just want to learn the basics.

    I don't really see how you are getting a valid trace out of that code (I get nothing if I try it as is), but as far as the textfield goes, you haven't shown any attempt in your code that might help to point to why you cannot get the text into a textfield.  It might be a problem with how you are trying to write to the textfield and not how your are manipulating the data.
    While you could make use of a textfield for the menu, doing so is not straightforward, as you would need to implement htmlText with special coding in order to have the text clickable.  You might consider using a List component or ComboBox instead.
    What I always do when I am working with xml is to store the data into a data structure, usually an array conatining objects, and then make use of that structure rather than dippng into the xml data itself when I utilize the data.
    Another thing, which rquigley demonstrated, is that your xml will serve its purpose better if the data for each image is collected under the same node.  If you have separate sections for each piece of data like you have, when it comes to editing it will be more prone to error as you have to be sure you are editing the correct entry of each separate group.
    I too am no expert in the world of xml, but I have not yet worked with parameters inside the tags, so I would usually structure it as...
    <images>
       <image>
           <imgName>image 1</imgName>
           <imgPath>image1.jpg</imgPath>
       </image>
       <image>
           <imgName>image 2</imgName>
           <imgPath>image2.jpg</imgPath>
       </image>
    </images>
    Now, back to what you have...  let's say you have a textField named imgText that you want to list the image names in.  The following should work, though I do not go my usual route of storing the data into an object array first...
    function parseImg(imgLoad:XML):void {
       var imgNames:XMLList = imgLoad.imagenames.name;
       var imgPaths:XMLList = imgLoad.imagepaths.path;
       // show name
       for each (var nameTrace:XML in imgNames) {
          trace(nameTrace);
          imgText.appendText(nameTrace +"\n");
       // show path
       for each (var pathTrace:XML in imgPaths) {
          trace(pathTrace);
          imgText.appendText(pathTrace +"\n");
       // show name and path
       for(var i:uint=0; i<imgNames.length(); i++){
          trace(imgNames[i].text()+"  "+imgPaths[i].text());
          imgText.appendText(imgNames[i].text()+"  "+imgPaths[i].text() +"\n");

  • Simple XML Editor

    Is there a simple, FREE, XML editor out there (written in Java)?
    I am using an XML file format for a small application I wrote, and I would prefer to edit the file using an XML editor, since it is easy to screw up the file in a text editor.
    If you've used Forte or Netbeans, all I want is a simple XML editor like the one that is built into the IDE.
    Thanks for any information.

    Vim works pretty good, its free, and has syntax highlighting. You would need to be familiar with using vi. http://www.vim.org/
    If you use Eclipse, you can get http://www.oxygenxml.com/. It's not free, but its cheaper than XMLSpy.
    I haven't found anything better than XMLSpy, even though its expensive.
    Does anyone know of another tool that can generate a sample instance document from a schema, and/or a schema from an instance document? I find that handy in XMLSpy.
    -Scott
    http://www.swiftradius.com

  • Covnert Complex XML to Simple XML tags using Adapter Module

    Hi
    <buyer>
    <fnParty:partyIdentifier partyIdentifier="GER" partyIdentifierQualifierCode="SenderAssigned"/>
    </buyer>
    I want to convert above complex xml into following simple xml document
    <buyer>GER</buyer>
    I am writing adapter module. Could any one please tell me how to convert this
    Regards
    Sowmya

    Hi,
    Is partyidentifier is source xml and buyer in target xml?
    You can map the attribute to buyer element in message mapping itself.
    Why do you want adapter module?
    Thanks,
    Beena.

  • 4 Simple Flash Questions that Are Stumping Me!

    What is the Frame Rate for Web Animations
    Q1. I am making an animation which will be played on the web. What is the default frame rate (fps) of Flash CS5? And what is the frame rate of for web?
    Q2. My animation needs to be 30 seconds long. So at 15 fps that would mean I need to use 600 frames in Flash?
    How Do I Mask everything so all I see is the Content on the Stage?
    I have a wide image that extends past my movies stage size so when I preview my movie the image is visible. How do I mask out anything that extends past my movies window size? I believe I can create a layer named "mask" and place it above all other layers, but I forget how to make the mask. Any help is appreciated.
    How to Fade a Graphic
    I have a graphic element (some type) and I want it to fade from 0% to 100%. In older versions of Flash I could just select the symbol and then set it's alpha value to 0%, move a few keyframes and then set the alpha to 100%. Voila! but now it doesn't seem to work that way. How can I do this in CS5?

    Ned, it says 24 fps which means there is 24 frames per second so each 24 frames is 1 second.
    Date: Fri, 4 Nov 2011 05:35:16 -0600
    From: [email protected]
    To: [email protected]
    Subject: 4 Simple Flash Questions that Are Stumping Me!
        Re: 4 Simple Flash Questions that Are Stumping Me!
        created by Ned Murphy in Flash Pro - General - View the full discussion
    1 You can create your character as a movieclip and copy/paste that movieclip from one file to another. 2. One way to create a movieclip is to copy all the frame of the animation's timeline (select them all, right click the selection, choose Copy Frames), then create a new movieclip symbol (Insert -> New Symbol...etc) right click on its only keyframe and chhose Paste Frames.  THat will put all the layers and frames you copied into the movieclip The only way to come close to being certain about the timing of you animation is to use code to keep track of the time, something like getTimer()..  The frame rate that a file plays at is not a reliable means of dictating the time it takes due to a variety of factors which include the amount of content you are trying to process and performance limits of the user's machine.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4007420#4007420
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4007420#4007420. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Simple performance question

    Simple performance question. the simplest way possible, assume
    I have a int[][][][][] matrix, and a boolean add. The array is several dimensions long.
    When add is true, I must add a constant value to each element in the array.
    When add is false, I must subtract a constant value to each element in the array.
    Assume this is very hot code, i.e. it is called very often. How expensive is the condition checking? I present the two scenarios.
    private void process(){
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             if (add)
             matrix[i][ii][iii][...]  += constant;
             else
             matrix[i][ii][iii][...]  -= constant;
    private void process(){
      if (add)
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             matrix[i][ii][iii][...]  += constant;
    else
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
           matrix[i][ii][iii][...]  -= constant;
    }Is the second scenario worth a significant performance boost? Without understanding how the compilers generates executable code, it seems that in the first case, n^d conditions are checked, whereas in the second, only 1. It is however, less elegant, but I am willing to do it for a significant improvement.

    erjoalgo wrote:
    I guess my real question is, will the compiler optimize the condition check out when it realizes the boolean value will not change through these iterations, and if it does not, is it worth doing that micro optimization?Almost certainly not; the main reason being that
    matrix[i][ii][iii][...]  +/-= constantis liable to take many times longer than the condition check, and you can't avoid it. That said, Mel's suggestion is probably the best.
    but I will follow amickr advice and not worry about it.Good idea. Saves you getting flamed with all the quotes about premature optimization.
    Winston

Maybe you are looking for

  • I want to transfer my iPhoto pics to my new computer, but how?

    I have an old dome based iMac running tiger. I want to transfer data to my newer duo core iMac. I bought a USB 32 gb storage device by lexor to load data from my old and put it on my new. When I plug the device into the USB port I see nothing to indi

  • "failed to find service connection url".

    What does this mean?  I have internet connection. I have tried restarting my phone (pressing both buttons at the same time) from a tip I found from another posting but I'm still getting this message. Help. I'm trying to download a book from itunes if

  • Can't find photo browser icon in Mail, I've just installed Lion

    I have just successfully installed Lion and when setting the toolbar in Mail I noticed that there isn't an icon for 'photo browser or attachments? Has the big cat eaten them or is there a more cunning method to attach photos to emails?

  • CTI-OS Architecture

    Hi Guys      At present we are in a environment where we are running CTI Server in individual PGs.      Customised Desktop Applications interact with CTI Server for Screen POP and receiving all relevant data for Call Handling.      We are planning to

  • What should my next mac be? Graphic Design Student.

    Right now I am still rocking the 2.26 Ghz Intel core 2 duo macbook pro 13". I upgraded the memory to 8 gig and it still runs fairly well. I am still in college, and have recently adopted a minor in graphic design so I have been using heaving software