Better with JDom or not?

Hello, I have one function to create a XML structure without use JDom. I read my strings and I create a Xml. It's difficult but I have already done. But my question is if it's easyer use JDom and create a new function.
Here my String
Name
Name.Surname
Name.Surname,Second
Name.Surname.First
Name2
Name.Surname
Name2.Surname.Folder
Name2.Structure
I want this Xml:
<Cuenta id="xx" label="xx1">
<node label="Borrador"></node>
<node label="Name">
    <node label="Surname">
              <node label="Second"</node>
              <node label="First"></node>
    </node>
</node>
<node label="Name2">
    <node label="Surname">
              <node label="Folder"</node>
    </node>
    <node label="Structure"></node>
</node>
</Cuenta>Exist any easy way to do that? Or it's better if I continue with my method(it's difficult and if I have to change something I have to change a lot of things. I want one function to create that dinamicaly, not always is the same list. My function do dinamicaly but it's not very clear for other people.
Thanks!

Now I'm creating manually and then I use JDom to transform to Xml and edit if I have to change something. You said that you would use JDom to create. To say the truth I'm a newbie with JDom, and I know how can create a very simple document, but not how can create this Xml starting with my list. I have to use split to separate the folders and ..... but I don't know how can create the Xml.
Now I have my old solution but if you see easy that this function using JDom, can you say me how can I do or some      
recommendations. Or if you show veryvery easy you can put the code, just kidding, hahaha (don't worry it's enough with some recomendations).
This is my actual code, has you can see it's a little complicate, I think that with JDom the code will be much more understandable.
public static String crearStringXML(lista) throws MessagingException, IOException
                java.util.Collections.sort(lista);//order the lsit
               String textOut="<Cuenta id=\"cuenta"+id+"\" label=\""+user+"\">";
               String[] oldPath = new String[0];
               String[] newPath=null;
               for(String path : lista) {
                    newPath = path.split("\\.");//dvide the folders
                  int matchLen = 0;
                  // To calculate how many are the same
                  while(matchLen < oldPath.length && matchLen < newPath.length && oldPath[matchLen].equals(newPath[matchLen]))
                          matchLen++;
                  for(int i = matchLen; i < oldPath.length; i++) {
                       textOut += "</node>";
                  for(int i = matchLen; i < newPath.length; i++){
                     textOut += "<node label=\"";
                     textOut += newPath[i]+"\">";
                 oldPath = newPath;
               for(int i =0;i< newPath.length;i++)
                    textOut +="</node>";
               textOut += "</Cuenta>";
               return textOut;
          }Thanks!

Similar Messages

  • NetStream.send not working in Flash Player 11.2 Beta with Cirrus, Please confirm if it is a bug

    Title
    NetStream.send not working in Flash Player 11.2 Beta with Cirrus, Please confirm if it is a bug or feature
    Description
    Problem Description:
    NetStream.send can not send data to peerstreams when using with cirrus. Conflict with documents.
    Sorry for tag the build as 11.0.1.3 while the bug is actually on 11.2 beta since the bug report system didn't have 11.2 beta yet.
    If you are not responsible for 11.2 beta bug fix, please help a hand to handle this bug to 11.2 team.
    This bug is "killing" to your application, so we really appreciate your help. Thanks.
    ==Publisher==
    nc.connect("rtmfp://");
    var ns:NetStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);
    ns.publish("sendtest");
    ...//after connection success.
    ns.send("clientfunction", "ok"); // this line cannot reach subscribers. even if subscribers have client object correctly.
    ==Subscriber==
    nc.connect("rtmfp://");
    var ns:NetStream = new NetStream(nc, cirrusid);
    var client:Object = new Object();
    client.clientfunction = clientfunction; // target function
    ns.client = client;
    ns.play("sendtest");
    Steps to Reproduce:
    1. compile the code in the attachment to SendTestExample.swf (not be able to paste it here)
    2. run it under flash player 11.2.202.19 beta
    3. run it under flash player 11
    Actual Result:
    HeartBeat is:
    Start HeartBeat:
    send hello
    send hello
    send hello
    which means NetStream.send was not able to call "clientfunction" as expected.
    Expected Result:
    Start HeartBeat:
    send hello
    in client function: hello
    send hello
    in client function: hello
    send hello
    in client function: hello
    which can call into the clientfunction as flash player 11 did.
    Any Workarounds:
    I can not find it out since it's an api level bug. But this can be very important for lots of applications which rely on send to do rpc.
    Test Configuration
    IE8, Firefox under Windows 7
    Also have problem under Windows XP (but not well tested on this platform)
    App Language(s)
    ALL
    OS Language(s)
    ALL
    Platform(s)
    Windows 7
    Browser(s)
    Internet Explorer 8.0
    ==Attachment==
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.NetStatusEvent;
        import flash.events.TimerEvent;
        import flash.media.Video;
        import flash.net.NetConnection;
        import flash.net.NetStream;
        import flash.text.TextField;
        import flash.utils.Timer;
        import flash.utils.setTimeout;
        public class SendTestExample extends Sprite
            public static var statusArea:TextField;
            var ncServer:NetConnection = new NetConnection();
            var nsServer:NetStream;
            var ncClient:NetConnection = new NetConnection();
            var nsClient:NetStream;
            var timer:Timer = new Timer(1000);
            public function SendTestExample() {
                ncServer.addEventListener("netStatus", onNCStatusServer);
                ncServer.connect("rtmfp://p2p.rtmfp.net","99f72ccbed0948d7589dc38a-3ce1b2616680");
                statusArea = new TextField();
                status("status");
                statusArea.x = 0;
                statusArea.y = 0;
                statusArea.border = true;
                statusArea.width = 200;
                statusArea.height = 350;
                addChild(statusArea);
            function onNCStatusServer(event:NetStatusEvent):void {
                status("Step 1:");
                status("server: " + event.info.code);
                status("id: " + ncServer.nearID);
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        nsServer = new NetStream(ncServer, NetStream.DIRECT_CONNECTIONS);
                        nsServer.addEventListener(NetStatusEvent.NET_STATUS, onNSStatusServer);
                        nsServer.publish("sendtest");
                        ncServer.removeEventListener(NetStatusEvent.NET_STATUS, onNCStatusServer);
                        ncClient.connect("rtmfp://p2p.rtmfp.net","99f72ccbed0948d7589dc38a-3ce1b2616680");
                        ncClient.addEventListener("netStatus", onNCStatusClient);
                    case "NetStream.Publish.BadName":
                        //status("Please check the name of the publishing stream" );
                        break;
            function onNCStatusClient(event:NetStatusEvent):void {
                status("Step 2:");
                status("client: " + event.info.code);
                status("id: " + ncClient.nearID);
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        nsClient = new NetStream(ncClient, ncServer.nearID);
                        var c:Object = new Object();
                        c["clientfunction"] = clientfunction;
                        nsClient.client = c;
                        nsClient.play("sendtest");
                        ncClient.removeEventListener(NetStatusEvent.NET_STATUS, onNCStatusClient);
                        //setTimeout(sendHello, 5000);
                    case "NetStream.Publish.BadName":
                        //status("Please check the name of the publishing stream" );
                        break;
            protected function onNSStatusServer(event:NetStatusEvent):void {
                status("nsserver: " + event.info.code);
                if (event.info.code == "NetStream.Play.Start") {
                    status("Start HeartBeat:");
                    this.timer.addEventListener(TimerEvent.TIMER, function (e:Event):void {
                        sendHello();
                    this.timer.start();
            protected function sendHello():void {
                status("send hello");
                nsServer.send("clientfunction", "hello");
            protected function status(msg:String):void
                statusArea.appendText(msg + "\n");
                trace("ScriptDebug: " + msg);
            protected function clientfunction(event:Object):void {
                status("in client function: " + event);

    Thanks for reporting. I can reproduce the bug in house. We will investigate.
    Calise

  • I have a problem with the icon in the menu bar MacBooster Beta 3 I can not delete

    I have a problem with the icon in the menu bar MacBooster Beta 3 I can not delete
    www.advancedmaccare.com
    and installed and uninstalled the program and past cleanApp or ccleaner programs and nothing works
    <Link Edited By Host>

    Beta = buggy software.  You need to contact the vendor. 

  • Why does iMessages does not work properly ? Please help me ! Its works better with the previous version if compared with the latest iOS

    Why does iMessages does not work properly ? Please help me ! Its works better with the previous version if compared with the latest iOS

    Many, many thanks for both of you Todd and Rick.
    to Rick:
    I suppose you mean the Color Settings in Project Settings as follows:
    - Working Space: None
    - Match Legacy ... Gamma Adjustments checked ON
    But it does not correct the colors in effects. And checking or unchecking Make Movie/Output Module Settings/Color Management/Profile/Preserve RGB does not make any difference.
    to both of you:
    Those parts of the video image that does not have color effects are just fine. In these parts the color is preserved when reimporting to FCP. However, those parts having color effects (except Levels, as decribed earlier) have altered color results. So, only the parts having effects affecting color are misinterpreted in the image area. The mismatch is of course seen in AE, before making the movie.
    What I ment with "Color Management not working properly" is that (instead of "disabling" it) Color Management does not seem to be able to correct this "misinterpretation" or difference in effect handling between AE 6 and 10.
    So, would you have any solution for this problem?
    Again, many thanks for your fast replies!

  • Better touch tool works with touchpad but not magic trackpad, better touch tool works with touchpad but not magic trackpad

    better touch tool gestures works with touchpad but not magic trackpad, why please ?

    this was an error problem solved

  • Feature Request: Make RECENTS better with two more drill down options

    Hi everyone!
    I love my iPhone but - as with everything - one can make things get even better... Not sure where to post so I try here. Would love to hear if you feel the same need:
    I realize that RECENTS within the phone application could be improved quite a bit by adding two simple buttons at the top.
    Right now there is "ALL" and "MISSED"... being able to drill down the MISSED calls is great, but many times I would like to be able to drill down:
    * outgoing calls (aka those placed by me via iPhone)
    * incoming calls (aka those that I received on my iPhone)
    Would love to hear what others think about that. If we there will be many replies chances are good that Apple will fix this with a software update. It should be very little work on Apple's side.
    Greetings!

    I agree this feature would be most useful: most other phones incorporate it, and it would probably not be too difficult to add it to the iPhone? I expect most will agree with you, but this type of feedback should be sent directly to Apple:
    http://www.apple.com/feedback/iphone.html

  • Errors with Time Machine (not completing backup, and needing to erase the ".inProgress" package)

    I have in a previous discussion been talking about errors with my Time Machine backup.  The errors were with a problem with Indexing a file, it fails and stops the whole backup.  Each time it attemps another backup, it fills my ".inProgress" package with a (nearly) whole backup, filling my Time Machine hard drive, and thus errasing my previous good backups.  The error occurs after about 95% completion.
    In my last post of a similar disscussion, the problem was indexing the Preference Pane files and this caused the whole backup to fail.  This was my last post there:  (below in some additional info of my situation)
    I did exclude the MobileMe.prefPane.  And I got:
    12/16/11 9:24:50.468 PM com.apple.backupd: Starting standard backup
    12/16/11 9:24:50.556 PM com.apple.backupd: Backing up to: /Volumes/3 TB GoFlex Drive/Backups.backupdb
    12/16/11 9:25:14.418 PM com.apple.backupd: Waiting for index to be ready (101)
    12/16/11 9:27:02.366 PM com.apple.backupd: Deep event scan at path:/ reason:must scan subdirs|
    12/16/11 9:27:02.366 PM com.apple.backupd: Finished scan
    12/16/11 9:33:37.119 PM com.apple.backupd: Deep event scan at path:/Volumes/Mac OS Lion GM reason:must scan subdirs|
    12/16/11 9:33:37.119 PM com.apple.backupd: Finished scan
    12/16/11 9:36:15.650 PM com.apple.backupd: 758.92 GB required (including padding), 830.32 GB available
    12/16/11 10:25:14.873 PM com.apple.backupd: Copied 22.8 GB of 630.5 GB, 782749 of 2357620 items
    12/16/11 11:25:15.335 PM com.apple.backupd: Copied 86.6 GB of 630.5 GB, 1167675 of 2357620 items
    12/17/11 12:25:16.227 AM com.apple.backupd: Copied 152.2 GB of 630.5 GB, 1393795 of 2357620 items
    Dec 17 01:25:16 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Copied 305.2 GB of 630.5 GB, 1413946 of 2357620 items
    Dec 17 02:25:16 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Copied 457.1 GB of 630.5 GB, 1419190 of 2357620 items
    Dec 17 03:19:07 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Copied 1736865 files (568.3 GB) from volume Macintosh HD.
    Dec 17 03:25:16 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Copied 572.1 GB of 630.5 GB, 1848939 of 2357620 items
    Dec 17 03:40:33 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Indexing a file failed. Returned 200 for: /Volumes/Mac OS Lion GM/System/Library/PreferencePanes/Mouse.prefPane, /Volumes/3 TB GoFlex Drive/Backups.backupdb/Tom iMac/2011-12-14-171406.inProgress/7DB524DD-EFB9-42A6-8A21-0A2A312EDA6D/Mac OS Lion GM/System/Library/PreferencePanes/Mouse.prefPane
    Dec 17 03:40:33 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Aborting backup because indexing a file failed.
    Dec 17 03:40:33 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Stopping backup.
    Dec 17 03:40:33 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Copied 2164998 files (581.1 GB) from volume Mac OS Lion GM.
    Dec 17 03:40:33 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Copy stage failed with error:11
    Dec 17 03:40:50 Thomas-P-Kellys-iMac com.apple.backupd[99858]: Backup failed with error: 11
    This time it was the Mouse.prefPane that caused the error.  I'd like to exclude the entire PreferencePanes directory.
    This was my error message this time:
    I just realized this was on my small Developers partition.  Perhaps there is an error with the build, OR an error with the initial restore.  I'd like to perhaps exclude the entire /Volumes/Mac OS Lion GM.  I expect that Time Machine is working fine with my main partition and the error happens when it's almost done with the Mac OS Lion GM partition.
    The problem now is that I only have 265 GB of 3 TB available on my Time Machine HDD.  If attempt another backup, it'll surely erase about 410 GB of my past saved backups.  I've already lost 6 months, and I only have two months left of backups.  I need to erase the ".inProgress" package again.  That'll take time, and it's impossible to do from this main partition, even at root access.  This ".inProgress" has a total of two (nearly) full backups; it didn't cleanup the first full backup attempt while starting the second,perhaps it would have had it finished.  But I fear even if I exclude the whole "Mac OS Lion GM" partition,  It'll create a third full backup before cleanup and erase ~400 GB of previous good backups.  Then, I'll have a total of 4 (nearly) full backups!  3 TB is just enough without any past backups.
    Maybe I'll just copy my documentations of my 'errasing the ".inProgress" package'  last time (from the Mac OS Lion GM partition) and do a full restore of just that partition.  Thus erasing the errors all together.  If it doesn't fix the errors then this could be a bug in the build that doesn't allow Time Machine to work.  I've always included this partition in Time Machine before, even with other Lion builds, so I suspect that it was an error in the initial restore.  (I may be answering my own questions, and that the inital restore (of the small partition) is the problem, and I just need to re-restore the small partition)
    Again, I'm going to have to erase the ".inProgress" file to regain 1.53 TB of space before proceeding.
    Also, I gave myself permission to read the ".Backup.345781513.887697.log", the log that was created last night when I first started Time Machine this last time.  It was interesting, but didn't show the error I could see from the console.
    Right now, mds and mdworker appear to be going crazy even after I just now turned off Time Machine.  I think I'll let it go for the rest of the night.  Then I'll work on erasing the ".inProgress" package from the other partition boot up.
    That was my entire last post.  To add some information, I have two OS X partitons, both Mac OS X Lion.  One is my large main partition, the other is one I don't mind testing with.  I recently replaced my internal hard drive in my iMac and restored from Time Machine both partitions.  This appeared to go smoothly.  But I have yet to create a single successful Time Machine backup since.  At first it was doing a Full Backup, which I didn't like, but now it just aborts around 95% completion.  Each, time, it tries it fills the Time Machine hard drive with duplicate (nearly) full backups errasing my older good backups.  I would like to erase the ".inProgress" file to save space.
    My main question in this new discussion is does anyone know of a good way of erasing the ".inProgress" file? This is so I can preseerve my previous backups.  ACLs and other permissions seem to make it impossible to erase from this startup partition, the one I'm running Time Machine from.  Even at root level, if I give myself permission to change permissions or delete a file, it'll say Operation not Permitted instead of Permission Denied.  I have been able to delete this ".inProgress" package before when booting from the other  partition, but with great difficulty.  I have had much help from another Member in this Support Community when it comes to solving my Time Machine problems.  I think I have found the problem (indexing files in my small OS X partition), as stated in my copy& pasted post above, but I really need to delete this inProgress package first to save space before continuing!

    Pondini wrote:
    Gator TPK wrote:
    Now I'll have to fix the small partition?  How's the best way to do this?  There could be thousands of files that won't index fine.
    See if there's anything you haven't done, that applies, in the pink box of #C3 in Time Machine - Troubleshooting
    Otherwise, since most (or all?) of the indexing errors are in OSX, you might want to just reinstall it.  Something may have gone wrong sometime, that damaged those files.
    I reviewed #C3 in Time Machine - Troubleshooting and I have already done most of those things.  I have just learned something new though:
    When I included my Main OS X partition again, I got an indexing error for the first time for that partition.  I might be interesting to note that the _spotlight process was running, and it's running again (the magnifying glass has a dot and it generically says "Indexing Tom's iMac").  mdworker, mds and backupd processes really are working hard, one moment they used over 500% of my CPU.  It's nice to know for once quad core is good for something other than video encoding.  (Now if they could just get the Finder to do more than 100.1%, only 1 thread is doing 100%, I'd like to see file size calculations 8 times quicker!)
    I never got an indexing error once in the past 2 weeks for that large Mac OS X v10.7.2 main volume, and it had appeared to finish that partition backup before running into problems with my smaller test partition.  Also, I had just updated the smaller test partition with a later build of Mac OS X.  But It appears that the beta builds are clearly not the problem.  I thought I could just restore again (from the December 4th backup) the small partition and both would be fine.
    I'll finish reviewing all the suggestions on Time Machine - Troubleshooting and go from there.  Hopefully, the _spotlight indexing simutaniously was the only problem.  It's strange that the indexing hasn't happened since the original restore last week untill I finally got a good clean complete partial Time Machine backup.  Why would the first Time Machine backup trigger indexing again?
    For now, I'm going to exclude the Main Partition again, and let another good backup run.  And try your suggestions.  (And wait till mds, mdworker, etc. to finish!)
    I have the logs of the first two sucsessful backups and the last two failed backups from the last 3 hours, if that would help.?

  • Help! my windows PC with Vista will not dowload itunes 10.7.  It gives me an error message: Your system has not been modified

    Help! my windows PC with Vista will not dowload itunes 10.7.  It gives me an error message: Your system has not been modified.I
    I have tried unistalling the current version I had which was 10.6.3, defragging and running a security scan. Now, the highest version I can get is 10.4.1. for some reason I cannot dowload itunes 10.5 or higher as it gives me the same message which is what I need to connect and update my iphone.  Anyone facing the same issue or can point me in the right direction?

    You may get better information on that error message by reposting in the iPhone forums:
    iPhone
    It's also possible that newer iPhone updates want an OS higher than Tiger. Post the specs of your computer and we can see if an OS upgrade is possible. There are a large number of G4 variants with different capabilities, so giving us something more than  just "G4" will get you help faster.

  • "Object Variable or With Block Variable not set" Error on Adobe Presenter 8 Ribbon on PPT 2010/2007

    Returning back from Adobe training at KEDRIYA VIDYALAYA no 1  Jalhalli Bangalore when I started Powerpoint to use Adobe Presenter 8  I am getting : "Object Variable or With Block Variable not set " error on clicking any of the menu features of the Presenter Ribbon. My Config are :
    i)             WINDOWS XP SP 3
    ii)            POWERPOINT 2007 / 2010 ( for both same error is coming)
    iii)           MS XML Library 4.0 installed.
    iv)           Adobe Presenter 8
    I am using all liscenced copies of softwares.
    Hardware specs are also as per Minimum Adobe standards.
    I Have tried a lot removing Data Execution Prevention Mode , but all in vain the problem still exists
    Why is this happening. Please help.
    Kamal K Gupta
    PGT Comp. SC.
    KV No. 2 Srivijaya nagar

    This is not really a "Downloading, Installing, Setting Up" question; you may get better help if you ask in the Presenter forum.

  • XML validation with JDOM / JAXP

    Hello,
    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    I did a first attempt but not sure I have understood all what I am doing :(
    First I have create a parser usinf org.jdom.*
    SAXBuilder parser = new SAXBuilderThen I built my document:
    Document doc = parser.build(myFile)These 2 steps are ok. But it does not do validation.
    I saw in the JDOM documentation that I can set a validation flag to true. I did it. First problem, I got the following error from JDOMException: Document is invalid: no grammar found.
    Is there a way to specify to the parser where to find the xsd file?
    As I did not find answer to this question by myself, I tried implementing the Schema class from JAXP:
    SAXBuilder parser = new SAXBuilder;
    Document doc = parser.build(myFile);
    Schema schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaFile);
    ValidatorHandler vh = schema.newValidatorHandler();
    SAXOutputter so = new SAXOutputter(vh);
    so.output(doc);It does the validation against the schema file specified but I am not really sure about what I am doing here. The last 2 commands are not clear to me :(
    Then in my schema file, I have elements that have default value. I expected the following behavior: if the element is not in the xml file then the default will be used by the parser (and added in the tree). But it seems, it's not the case.
    Any help/explanation will be really appreciated.

    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    If only schema validation is required use the validation API in JDK 5.0.
    http://www-128.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html
    http://java.sun.com/developer/technicalArticles/xml/validationxpath/
    For validation with JDOM, the following validation application explains the procedure:import org.jdom.input.SAXBuilder;
    import org.xml.sax.SAXException;import org.jdom.*;
    import java.io.*;
    public class JDOMValidator{
    public void validateSchema(String SchemaUrl, String XmlDocumentUrl){
               try{
    SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser",true);<br/>saxBuilder.setValidation(true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema",true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
    saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",SchemaUrl);
    Validator handler=new Validator();
    saxBuilder.setErrorHandler(handler);
    saxBuilder.build(XmlDocumentUrl);
    if(handler.validationError==true)
    System.out.println("XML Document has Error:"+handler.validationError+""+
    handler.saxParseException.getMessage());      
    else           
          System.out.println("XML Document is valid");
              }catch(JDOMException jde){
                }catch(IOException ioe){
    private class Validator extends DefaultHandler{     
         public boolean  validationError = false; 
         public SAXParseException saxParseException=null;    
      public void error(SAXParseException exception) throws SAXException{        
         validationError =true;
         saxParseException=exception; 
      public void fatalError(SAXParseException exception) throws SAXException  {
    validationError = true;     
    saxParseException=exception;
      public void warning(SAXParseException exception) throws SAXException       {
    public static void main(String[] argv)   {
       String SchemaUrl=argv[0];StringXmlDocumentUrl=argv[1];
       JDOMValidator validator=new JDOMValidator();
       validator.validateSchema(SchemaUrl,XmlDocumentUrl);
    }

  • Problem with JDOM and schemas

    I'm trying to parse (and validate) an XML document with JDOM.
    My root element is declared in the schaema whixh is asociated to the document.
    But during parsing, an exception saying that my root element is not declared is thrown.
    Can someone axplain to me what can happen ?
    Thank's

    What's this element ?
    My schema is indicated by the xsi:schemeLocation attribute of my root-element .

  • DNG files created with LR4 do not show thumbnails

    Hi, 
    When using LR3 to create DNG files from my RAW files, those files would show me thumbnails of my image in Windows Explorer.  I am running Windows/7 (64) and have installed a CODEC from "Fast Picture Viewer" that allows thumbnails from RAW & DNG files to be shown.   It seems, however, that the thumbnails do not show for DNG's created with LR4.
    To Remedy this I uninstalled the CODEC.  Downloaded the most recent version and installed it but this did not fix the problem.
    I then went to the user forum for the CODEC product and searched for my problem.  I found a thread who's solution is to turn off "Embed Fast Load Data" when exporting to DNG and it fixes the problem.  I tried this and indeed it did fix it.  The responder went on to say ".....When this option is enabled the files created are no longer DNGs (just an undocumented private format of Adobe that no one else can read to this date)".   This statement surprised me as it is counter to what I understand Adobe created DNG to be.  Can I get some input on this comment as if true it is very troubling.
    My second question is that I see where to turn off the "Embed Fast Load Data" in the LR Export module, but where do I do the same thing in the Import module when I'm selecting import mode "Copy to DNG"?
    And, my thrid question is this.  If indeed the DNG files created by LR4 are proper DNG files and this CODEC is just flawed in some way, does anyone have a better way to allow image thumbnails to be shown in Windows Explorer?
    Thanks -- Dan

    Hi David,
    You testing does not coincide with mine.  I have consistently kept "Use
    lossy compression" turned off.  With lossy turned off, it seems that using
    Fast Data Load prevents the thumbnails from displaying whereas turning off
    "Fast Data Load" allows the thumbnail to be shown.
    Below is comment from Adobe confirming that they have yet to release the
    spec containing "Fast Data Load".
    From: Ian Lyons [email protected]
    Sent: Tuesday, June 05, 2012 12:29 AM
    To: Califdan
    Subject: DNG files created with LR4 do not show
    thumbnails
    Re: DNG files created with LR4 do not show thumbnails
    created by Ian Lyons in Photoshop Lightroom - View the full discussion

  • BPC 4.2 Optimization error (object variable or with block variable not set)

    Hi All,
    I am getting the following error when I try to optimize application from the front end:
    Run-time error '91':
    Object variable or With block variable not set
    From the back end the optimization works just fine. This is the new application I created from the AppShell. As soon as I created this new application set, I tried to run optimization and I am getting this error. Optimization in the AppShell works just fine. I wonder what the problem is since this is a brand new application set. I tried a few things all day yesterday and day before but in vain.
    We are using BPC 4.2 (OutlookSoft CPM). Any help is greatly appreciated, the sooner the better.
    Thanks in advance!

    Depending on your version of 4.2, here are two possible issues and remedys.
    Possible issue #1
    Do you only have 1 application in the appset? - Add another application.
    Possible issue #2
    This problem will occur if you have copied 4.2 SP2 Apshell or copied an existing appset.
    This happens when a table named tblAdminTaskMessage exists and a stored procedure named INPUTMESSAGE does not exist.
    The table and stored procedure are created when you run optimize for the first time and when you make copy of Apshell that has been optimized once, it can copy the table but it cannot copy the stored procedures.
    The workaround is to delete the tblAdmintaskMesssage table in SQL Enterprise Manager within the problem appset.
    Hope this helps.

  • Modifying XML files with JDOM

    Hi:
    I've been trying to get up to speed with JDOM, and while it seems pretty intuitive, I've been having a problem w/ modifying XML documents.
    Namely, once I get a Document object from a (skeleton) XML file, do changes made to the Document object through, say, addContent() propagate to the original file? My gut feeling is no, although this was certainly what I had expected initially.
    Here's a code fragment of what I had tried to do to populate a barebones XML file:
                   Document doc = builder.build(output);
              // add 100 elements, all the same
              for (int count = 0; count < 100; count++)
                   Element curr = new Element("book");
                   // create child nodes for book
                   Element title = new Element("title");
                   title.addContent("Book " + (count + 1));
                   Element author = new Element("author");
                   author.addContent("Author " + (count + 1));
                   Element price = new Element("price");
                   price.addContent("Price " + (count + 1));
                   curr.addContent(title);
                   curr.addContent(author);
                   curr.addContent(price);
                   doc.getRootElement().addContent( curr );
              }

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • AIR 3.4 SDK Beta with iOS6 Support is missing BETA 2 update

    We are trying to get our application that uses native extensions working with iO6 and AIR 3.4.  I can see from the website that there was an update on August 7th, and the top links show that update in the link date:
    Ie: http://labsdownload.adobe.com/pub/labs/flashplatformruntimes/air3-4/air3-4_p2_sdk_mac_080712.tbz2
    However the links under “AIR 3.4 SDK Beta with iOS6 Support”, have  not been updated.  (And that is oviously the build we are most interested in)
    http://labsdownload.adobe.com/pub/labs/flashplatformruntimes/air3-4/air3-4_p1_sdk_ios6_mac _071612.tbz2

    So I found the problem.   I had installed beta 1 in a folder called AIR 3.4     ...   I installed beta 2 in a folder called  AIR 3.4 Beta2      
    I did however point Flash CS6 to use the AIR 3.4 Beta2 SDK ...    it must not like something about this.   Once I deleted both SDK's and then put Beta 2 in a folder simply titled AIR 3.4 everything works again.

Maybe you are looking for