How to bind dynamic xml with Java objects without xsd

have a question, and hope someone here can help me.
In my current project, I will get a xml file, containing some information of each user, and map them into a set of user objects.
For each user, there are some fixed attributes, such as name, phone#, age, position, etc. The problem is, client can customize, and add new attibutes, such as address, favorite color, so there will be no xsd for the xml.
What I want to do, is map fixed attributes to user object attributes, for example, name attribute to User.name, and they will have corresponding getters, and setters, but for custom attributes, I want to add them to a HashMap in User object, for example, use string "ADDRESS" as the key, and address as the value.
Is there any way I can do this? Thank you very much for any help you can provide.

It would not be too hard to do in regular code.
First, make a HashSet with the Strings for the names of the known attributes that will be processed with setters.
Then, get the NamedNodeMap via getAttributes(). That will give you all attributes -- both the ones you will handle with your setters and the ones you will handle via a HashMap.
Then, loop through the NamedNodeMap. For each attribute, get the name and value. If the name is in the HashSet of known values, process it with a list of
if ( attName.equals( "name" ))
    whatever.setName( value );
   continue;
}If it is not in the HashSet, then set the value into your HashMap with the name and value.
There is no standard way to do this.
Dave Patterson

Similar Messages

  • HOW TO KNOW VALID XML WITH DTD ? WITHOUT PARSING  ?

    i am creating the xml file
    i need to validate the xml with DTD to confirm is it valid or not ?
    with out parsing...
    could you tell me how ?
    Durga

    without parsing u cant do it..

  • How to parse XML to Java object... please help really stuck

    Thank you for reading this email...
    If I have a **DTD** like:
    <!ELEMENT person (name, age)>
    <!ATTLIST person
         id ID #REQUIRED
    >
    <!ELEMENT name ((family, given) | (given, family))>
    <!ELEMENT age (#PCDATA)>
    <!ELEMENT family (#PCDATA)>
    <!ELEMENT given (#PCDATA)>
    the **XML** like:
    <person id="a1">
    <name>
         <family> Yoshi </family>
         <given> Samurai </given>
    </name>
    <age> 21 </age>
    </person>
    **** Could you help me to write a simple parser to parse my DTD and XML to Java object, and how can I use those objects... sorry if the problem is too basic, I am a beginner and very stuck... I am very confuse with SAXParserFactory, SAXParser, ParserAdapter and DOM has its own Factory and Parser, so confuse...
    Thank you for your help, Yo

    Hi, Yo,
    Thank you very much for your help. And I Wish you are there...I'm. And I plan to stay - It's sunny and warm here in Honolulu and the waves are up :)
    A bit more question for dear people:
    In the notes, it's mainly focus on JAXB,
    1. Is that mean JAXB is most popular parser for
    parsing XML into Java object? With me, definitely. There are essentially 3 technologies that allow you to parse XML documents:
    1) "Callbacks" (e.g. SAX in JAXP): You write a class that overrides 3 methods that will be called i) whenever the parser encounters a start tag, ii) an end tag, or iii) PCDATA. Drawback: You have to figure out where the heck in the document hierarchy you are when such a callback happens, because the same method is called on EACH start tag and similarly for the end tag and the PCDATA. You have to create the objects and put them into your own data structure - it's very tedious, but you have complete control. (Well, more or less.)
    2) "Tree" (e.g. DOM in JAXP, or it's better cousin JDOM): You call a parser that in one swoop creates an entire hierarchy that corresponds to the XML document. You don't get called on each tag as with SAX, you just get the root of the resulting tree. Drawback: All the nodes in the tree have the same type! You probably want to know which tags are in the document, don't you? Well, you'll have to traverse the tree and ask each node: What tag do you represent? And what are your attributes? (You get only strings in response even though your attributes often represent numbers.) Unless you want to display the tree - that's a nice application, you can do it as a tree model for JTree -, or otherwise don't care about the individual tags, DOM is not of much help, because you have to keep track where in the tree you are while you traverse it.
    3) Enter JAXB (or Castor, or ...): You give it a grammar of the XML documents you want to parse, or "unmarshall" as the fashion dictates to call it. (Actually the name isn't that bad, because "parsing" focuses on the input text while "unmarshalling" focuses on the objects you get, even though I'd reason that it should be marshalling that converts into objects and unmarshalling that converts objects to something else, and not vice versa but that's just my opinion.) The JAXB compiler creates a bunch of source files each with one (or now more) class(es) (and now interfaces) that correspond to the elements/tags of your grammar. (Now "compiler" is a true jevel of a misnomer, try to explain to students that after they run the "compiler", they still need to compile the sources the "compiler" generated with the real Java compiler!). Ok, you've got these sources compiled. Now you call one single method, unmarshall() and as a result you get the root node of the hierarchy that corresponds to the XML document. Sounds like DOM, but it's much better - the objects in the resulting tree don't have all the same type, but their type depends on the tag they represent. E.g if there is the tag <ball-game> then there will be an object of type myPackage.BallGame in your data structure. It gets better, if there is <score> inside <ball-game> and you have an object ballGame (of type BallGame) that you can simply call ballGame.getScore() and you get an object of type myPackage.Score. In other words, the child tags become properties of the parent object. Even better, the attributes become properties, too, so as far as your program is concerned there is no difference whether the property value was originally a tag or an attribute. On top of that, you can tell in your schema that the property has an int value - or another primitive type (that's like that in 1.0, in the early release you'll have to do it in the additional xjs file). So this is a very natural way to explore the data structure of the XML document. Of course there are drawbacks, but they are minor: daunting complexity and, as a consequence, very steep learning curve, documentation that leaves much to reader's phantasy - read trial and error - (the user's guide is too simplicistic and the examples too primitive, e.g. they don't even tell you how to make a schema where a tag has only attributes) and reference manual that has ~200 pages full of technicalities and you have to look with magnifying glas for the really usefull stuff, huge number of generated classes, some of which you may not need at all (and in 1.0 the number has doubled because each class has an accompanying interface), etc., etc. But overall, all that pales compared to the drastically improved efficiency of the programmer's efforts, i.e. your time. The time you'll spend learning the intricacies is well spent, you'll learn it once and then it will shorten your programming time all the time you use it. It's like C and Java, Java is order of magnitude more complex, but you'd probably never be sorry you gave up C.
    Of course the above essay leaves out lots and lots of detail, but I think that it touches the most important points.
    A word about JAXB 1.0 vs. Early Release (EA) version. If you have time, definitively learn 1.0, they are quite different and the main advantage is that the schema combines all the info that you had to formulate in the DTD and in the xjs file when using the EA version. I suggested EA was because you had a DTD already, but in retrospect, you better start from scratch with 1.0. The concepts in 1.0 are here to stay and once your surmounted the learning curve, you'll be glad that you don't have to switch concepts.
    When parser job is done,
    what kind of Java Object we will get? (String,
    InputStream or ...)See above, typically it's an object whose type is defined as a class (and interface in 1.0) within the sources that JABX generates. Or it can be a String or one of the primitive types - you tell the "compiler" in the schema (xjs file in EA) what you want!
    2. If we want to use JAXB, we have to contain a
    XJS-file? Something like:In EA, yes. In 1.0 no - it's all in the schema.
    I am very new to XML, is there any simpler way to get
    around them? It has already take me 4 days to find a
    simple parser which give it XML and DTD, then return
    to me Java objects ... I mean if that kind of parser
    exists....It'll take you probably magnitude longer that that to get really familiar with JAXB, but believe me it's worth it. You'll save countless days if not weeks once you'll start developing serious software with it. How long did it take you to learn Java and it's main APIs? You'll either invest the time learning how to use the software others have written, or you invest it writing it yourself. I'll take the former any time. But it's only my opinion...
    Jan

  • Dynamic XML with Weblogic ?

    hello all !!
    May be this question is already answered, and sorry for that, but here again !
    I am trying to use Weblogic server, in order to process XML files, this files
    make a query to my Oracle Data Base, Before this I was using Cocoon (apache) to
    generate the dynamic XML with the query's result, is there a way to make the same
    thing with Weblogic ? anybody know how to do it ? do yu have a simple example
    ? here is a sample code that I use with cocoon.
    <?xml version="1.0" ?>
    <?cocoon-process type="xsp"?>
    <xsp:page language="java" xmlns:sql="http://www.apache.org/1999/SQL"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:request="http://www.apache.org/1999/XSP/Request">
    <page title="SQL Search Results">
    <sql:execute-query>
    <sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
    <sql:dburl>jdbc:oracle:thin:@IP_Address:1521:cta</sql:dburl>
    <sql:username>User</sql:username>
    <sql:password>Password</sql:password>
    <sql:doc-element>My_table</sql:doc-element>
    <sql:row-element>record</sql:row-element>
    <sql:query>select * from My_table</sql:query>
    </sql:execute-query>
    </page>
    </xsp:page>
    Thanks a lot for your help !
    Gustavo Mejia
    INFOTEC

    Since Cocoon is a servlet, just install it in Weblogic.
    "Gustavo Mejia" <[email protected]> wrote in message
    news:3b5ca3fa$[email protected]..
    >
    hello all !!
    May be this question is already answered, and sorry for that, but hereagain !
    >
    I am trying to use Weblogic server, in order to process XML files, thisfiles
    make a query to my Oracle Data Base, Before this I was using Cocoon(apache) to
    generate the dynamic XML with the query's result, is there a way to makethe same
    thing with Weblogic ? anybody know how to do it ? do yu have a simpleexample
    ? here is a sample code that I use with cocoon.
    <?xml version="1.0" ?>
    <?cocoon-process type="xsp"?>
    <xsp:page language="java" xmlns:sql="http://www.apache.org/1999/SQL"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:request="http://www.apache.org/1999/XSP/Request">
    <page title="SQL Search Results">
    <sql:execute-query>
    <sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
    <sql:dburl>jdbc:oracle:thin:@IP_Address:1521:cta</sql:dburl>
    <sql:username>User</sql:username>
    <sql:password>Password</sql:password>
    <sql:doc-element>My_table</sql:doc-element>
    <sql:row-element>record</sql:row-element>
    <sql:query>select * from My_table</sql:query>
    </sql:execute-query>
    </page>
    </xsp:page>
    Thanks a lot for your help !
    Gustavo Mejia
    INFOTEC

  • Starting xml with java

    hi all,
    cud any one provide me with the url that contain the examples of how to integrate xml with java.as i am new in this field so i need something from the very basic.and what all stuff do i need on my system to run the code.
    thanx in advance
    anshul

    http://java.sun.com/xml/index.html

  • JAXB and inheritance. Converting xml to java object

    I have a schema "FreeStyle.xsd" i used JAXB to generate POJO's . I get around 15 classes. I have a config.xml which is compliant to this schema . Now i want to write a java program which takes the config.xml and converts it into a java object . Please anybody help me with this . Thanks in advance
    Freestyle.xsd
    <?xml version="1.0" encoding="windows-1252"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="FreeStyleProject" type="hudson.model.FreeStyleProject"/>
    <xsd:complexType name="hudson.model.FreeStyleProject">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.Project">
        <xsd:sequence/>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.Project">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.BaseBuildableProject">
        <xsd:sequence/>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.BaseBuildableProject">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.AbstractProject">
        <xsd:sequence/>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.AbstractProject">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.Job">
        <xsd:sequence>
         <xsd:element name="concurrentBuild" type="xsd:boolean"/>
         <xsd:element name="downstreamProject" type="hudson.model.AbstractProject"
                      minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="scm" type="hudson.scm.SCM" minOccurs="0"/>
         <xsd:element name="upstreamProject" type="hudson.model.AbstractProject"
                      minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.scm.SCM">
      <xsd:sequence>
       <xsd:element name="browser" type="hudson.scm.RepositoryBrowser"
                    minOccurs="0"/>
       <xsd:element name="type" type="xsd:string" minOccurs="0"/>
      </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="hudson.scm.RepositoryBrowser">
      <xsd:sequence/>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.Job">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.AbstractItem">
        <xsd:sequence>
         <xsd:element name="buildable" type="xsd:boolean"/>
         <xsd:element name="build" type="hudson.model.Run" minOccurs="0"
                      maxOccurs="unbounded"/>
         <xsd:element name="cascadingChildrenName" type="xsd:string" minOccurs="0"
                      maxOccurs="unbounded"/>
         <xsd:element name="color" type="hudson.model.BallColor" minOccurs="0"/>
         <xsd:element name="firstBuild" type="hudson.model.Run" minOccurs="0"/>
         <xsd:element name="healthReport" type="hudson.model.HealthReport"
                      minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="inQueue" type="xsd:boolean"/>
         <xsd:element name="keepDependencies" type="xsd:boolean"/>
         <xsd:element name="lastBuild" type="hudson.model.Run" minOccurs="0"/>
         <xsd:element name="lastCompletedBuild" type="hudson.model.Run"
                      minOccurs="0"/>
         <xsd:element name="lastFailedBuild" type="hudson.model.Run" minOccurs="0"/>
         <xsd:element name="lastStableBuild" type="hudson.model.Run" minOccurs="0"/>
         <xsd:element name="lastSuccessfulBuild" type="hudson.model.Run"
                      minOccurs="0"/>
         <xsd:element name="lastUnstableBuild" type="hudson.model.Run"
                      minOccurs="0"/>
         <xsd:element name="lastUnsuccessfulBuild" type="hudson.model.Run"
                      minOccurs="0"/>
         <xsd:element name="nextBuildNumber" type="xsd:int"/>
         <xsd:element name="property" type="hudson.model.JobProperty" minOccurs="0"
                      maxOccurs="unbounded"/>
         <xsd:element name="queueItem" type="hudson.model.Queue-Item"
                      minOccurs="0"/>
        </xsd:sequence>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.Queue-Item">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.Actionable">
        <xsd:sequence>
         <xsd:element name="blocked" type="xsd:boolean"/>
         <xsd:element name="buildable" type="xsd:boolean"/>
         <xsd:element name="id" type="xsd:int">
          <xsd:annotation>
           <xsd:documentation>VM-wide unique ID that tracks the {@link Task} as it
                              moves through different stages in the queue (each
                              represented by different subtypes of {@link Item}.</xsd:documentation>
          </xsd:annotation>
         </xsd:element>
         <xsd:element name="inQueueSince" type="xsd:long"/>
         <xsd:element name="params" type="xsd:string" minOccurs="0"/>
         <xsd:element name="stuck" type="xsd:boolean"/>
         <xsd:element name="task" type="xsd:anyType" minOccurs="0">
          <xsd:annotation>
           <xsd:documentation>Project to be built.</xsd:documentation>
          </xsd:annotation>
         </xsd:element>
         <xsd:element name="why" type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.Actionable">
      <xsd:sequence>
       <xsd:element name="action" type="xsd:anyType" minOccurs="0"
                    maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.JobProperty">
      <xsd:sequence/>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.HealthReport">
      <xsd:sequence>
       <xsd:element name="description" type="xsd:string" minOccurs="0"/>
       <xsd:element name="iconUrl" type="xsd:string" minOccurs="0"/>
       <xsd:element name="score" type="xsd:int"/>
      </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.Run">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.Actionable">
        <xsd:sequence>
         <xsd:element name="artifact" type="hudson.model.Run-Artifact" minOccurs="0"
                      maxOccurs="unbounded"/>
         <xsd:element name="building" type="xsd:boolean"/>
         <xsd:element name="description" type="xsd:string" minOccurs="0"/>
         <xsd:element name="duration" type="xsd:long"/>
         <xsd:element name="fullDisplayName" type="xsd:string" minOccurs="0"/>
         <xsd:element name="id" type="xsd:string" minOccurs="0"/>
         <xsd:element name="keepLog" type="xsd:boolean"/>
         <xsd:element name="number" type="xsd:int"/>
         <xsd:element name="result" type="xsd:anyType" minOccurs="0"/>
         <xsd:element name="timestamp" type="xsd:long" minOccurs="0"/>
         <xsd:element name="url" type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.Run-Artifact">
      <xsd:sequence>
       <xsd:element name="displayPath" type="xsd:string" minOccurs="0"/>
       <xsd:element name="fileName" type="xsd:string" minOccurs="0"/>
       <xsd:element name="relativePath" type="xsd:string" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>Relative path name from {@link Run#getArtifactsDir()}</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="hudson.model.AbstractItem">
      <xsd:complexContent>
       <xsd:extension base="hudson.model.Actionable">
        <xsd:sequence>
         <xsd:element name="description" type="xsd:string" minOccurs="0"/>
         <xsd:element name="displayName" type="xsd:string" minOccurs="0"/>
         <xsd:element name="name" type="xsd:string" minOccurs="0"/>
         <xsd:element name="url" type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
       </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:simpleType name="hudson.model.BallColor">
      <xsd:restriction base="xsd:string">
       <xsd:enumeration value="red"/>
       <xsd:enumeration value="red_anime"/>
       <xsd:enumeration value="yellow"/>
       <xsd:enumeration value="yellow_anime"/>
       <xsd:enumeration value="green"/>
       <xsd:enumeration value="green_anime"/>
       <xsd:enumeration value="blue"/>
       <xsd:enumeration value="blue_anime"/>
       <xsd:enumeration value="grey"/>
       <xsd:enumeration value="grey_anime"/>
       <xsd:enumeration value="disabled"/>
       <xsd:enumeration value="disabled_anime"/>
       <xsd:enumeration value="aborted"/>
       <xsd:enumeration value="aborted_anime"/>
      </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    Config.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <project>
      <actions/>
      <description>Sample job ..</description>
      <project-properties class="java.util.concurrent.ConcurrentHashMap">
        <entry>
          <string>hudson-plugins-disk_usage-DiskUsageProperty</string>
          <base-property>
            <originalValue class="hudson.plugins.disk_usage.DiskUsageProperty"/>
            <propertyOverridden>false</propertyOverridden>
          </base-property>
        </entry>
        <entry>
          <string>jdk</string>
          <string-property>
            <originalValue class="string">(Inherit From Job)</originalValue>
            <propertyOverridden>false</propertyOverridden>
          </string-property>
        </entry>
        <entry>
          <string>scm</string>
          <scm-property>
            <originalValue class="hudson.scm.NullSCM"/>
            <propertyOverridden>false</propertyOverridden>
          </scm-property>
        </entry>
      </project-properties>
      <keepDependencies>false</keepDependencies>
      <creationTime>1402648240275</creationTime>
      <properties/>
      <cascadingChildrenNames class="java.util.concurrent.CopyOnWriteArraySet"/>
      <cascading-job-properties class="java.util.concurrent.CopyOnWriteArraySet">
        <string>hudson-plugins-batch_task-BatchTaskProperty</string>
        <string>hudson-plugins-disk_usage-DiskUsageProperty</string>
        <string>hudson-plugins-jira-JiraProjectProperty</string>
        <string>org-hudsonci-plugins-snapshotmonitor-WatchedDependenciesProperty</string>
        <string>hudson-plugins-promoted_builds-JobPropertyImpl</string>
      </cascading-job-properties>
      <scm class="hudson.scm.NullSCM"/>
      <canRoam>false</canRoam>
      <disabled>false</disabled>
      <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
      <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
      <concurrentBuild>false</concurrentBuild>
      <cleanWorkspaceRequired>false</cleanWorkspaceRequired>
    </project>
    the file generated by JAXB are
    com\model\HudsonModelAbstractItem.java
    com\model\HudsonModelAbstractProject.java
    com\model\HudsonModelActionable.java
    com\model\HudsonModelBallColor.java
    com\model\HudsonModelBaseBuildableProject.java
    com\model\HudsonModelFreeStyleProject.java
    com\model\HudsonModelHealthReport.java
    com\model\HudsonModelJob.java
    com\model\HudsonModelJobProperty.java
    com\model\HudsonModelProject.java
    com\model\HudsonModelQueueItem.java
    com\model\HudsonModelRun.java
    com\model\HudsonModelRunArtifact.java
    com\model\HudsonScmRepositoryBrowser.java
    com\model\HudsonScmSCM.java
    com\model\ObjectFactory.java
    Any help will be appreciated .
    Thanks in advance

    Unmarshal the config.xml to Java object.
    Basic JAXB Examples - The Java EE 5 Tutorial

  • XML to java object AND Performance

    Hi,
    I read some article about marshalling a XML file to Java Object (like Castor, XML Beans projects...)
    To resume: I would like to marshal a XML doc (from XML to Java object. Later I would like to put these objects on a SGBD...). Unfortenaly I suppose that approach is to expensive on term of performance? Supposing that my xml doc contain 100 data's occurances, XML bean woulkd create 100 objects corresponding. My problem is that I don't want that the all 100 objects live in the same time on memory. For example, my code will read sequential, the xml occurances (like a Sax parser), create 10 datas objects (standby), put these in the data base, and destroy these objects before...iteratively create the next 10 objects...
    It is possible ? Can anybody help me?
    Thank

    On the article: Java Architecture for XML Binding (JAXB)
    (http://java.sun.com/developer/technicalArticles/WebServices/jaxb/)
    I found maybe a response?
    "...in other words, you can do a SAX parse of a document and then pass the events to JAXB for unmarshalling. "
    But somebody could help me to write the code to do that?

  • How to connect oracle database with JAVA

    how to connect oracle database with JAVA....
    using j2sdk and Jcreator . which connector to use .. what are the code for that ..

    PLEASE .... Ask in an Oracle Java forum.
    And read the documentaiton. There is a whole document devoted to doing that. http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/toc.htm has examples.
    PLEASE ... do not ask product questions in a forum which clearly has a title saying it is devoted to assisting with download problems.

  • Convert MBox into XML into Java Objects

    Hello all,
    this is a general question, i dont know weather there is such libs or not.
    However, please tell me what you know.
    i want to program a java application for searching purpose in Mbox.
    i thought its possible and easier to try to convert the emails from the MBox into XML files, and from these create java objects when i need or even convert the XML into html for viewing.
    Any suggestions are welcome.
    Also antoher solutions are greate.
    thanks in advance!
    Sako.

    I don't know what this MBox you speak of is - I assume it's not the thing I use to hook upa guitar to GarageBand. Maybe you mean it as a generic term for mailbox? The easiest solution (to my mind) would be to use a Java API provided by whatever MBox is. If there is no such thing, then if you get XML-formatted version of the messages I suppose writing code to parse the XML into Java Objects would be a good option if you wanted to do further manipulation of them, but if all you want to do is display them as HTML in a browser then just use XSLT to transform them.
    Good Luck
    Lee

  • How to convert Property files into Java Objects.. help needed asap....

    Hi..
    I am currently working on Internationalization. I have created property files for the textual content and using PropertyResourceBundles. Now I want to use ListResourceBundles. So what I want to know is..
    How to convert Property files into Java Objects.. I think Orielly(in their book on Internationalization) has given an utitlity for doing this. But I did not get a chance to look into that. If anyone has come across this same issue, can you please help me and send the code sample on how to do this..
    TIA,
    CK

    Hi Mlk...
    Thanks for all your help and suggestions. I am currently working on a Utility Class that has to convert a properties file into an Object[][].
    This will be used in ListResourceBundle.
    wtfamidoing<i>[0] = currentKey ;
    wtfamidoing<i>[1] = currentValue ;I am getting a compilation error at these lines..(Syntax error)
    If you can help me.. I really appreciate that..
    TIA,
    CK

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

  • Failed to load value at index 22 with java object of type java.lang.String

    Hi all,
    As i am trying to open the notifications created from Administartor Workflow ,
    It throws a below error::
    oracle.apps.fnd.framework.OAException: oracle.jbo.AttributeLoadException: JBO-27022: Failed to load value at index 22 with java object of type java.lang.String due to java.sql.SQLException. at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912) at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:886) at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:1009) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:720) at oracle.apps.ap.oie.workflow.apexp.webui.NotifExpLinesCO.processRequest(NotifExpLinesCO.java:116) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:600) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.process
    java.sql.SQLException: Invalid column index
    at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:1042) at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1198) at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:1633) at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:2221).
    No extensions done in the page
    Please let me know the cause for this error ASAP
    Thanks
    Kash

    Problem solved. set the datatype as timestamp for that attribute in buissiness object.

  • How to program a screensaver with java???

    Hi all,
    Can someone tell em how to program a screensaver with java, and how should i begin ? or maybe someone know any useful information source?
    thanks a lot.
    ck

    A quick google search gives me, among lots of other things:
    http://kevinkelley.mystarband.net/java/sava.html
    Good luck
    Lee

  • How to generate dynamic XML

    Hi there,
    I am looking for a solution to the following code which will work only for a particular table , what if i want it to work for all the tables where columns names and columns quantiry varry , is there any dynamic way to accomplish this?
    ---> here is code snippet
    MyClob := '<root>' ||
    '<row type="old">' ||
    '<column name="REFTYPECODE" value="' || :old.REFTYPECODE || '"/>' ||
    '<column name="REFTYPEDESC" value="' || :old.REFTYPEDESC || '"/>' ||
    '<column name="CREATEDBY" value="' || :old.CREATEDBY || '"/>' ||
    '<column name="CREATEDDATETIME" value="' || :old.CREATEDDATETIME || '"/>' ||
    '<column name="UPDATEDBY" value="' || :old.UPDATEDBY || '"/>' ||
    '<column name="UPDATEDDATETIME" value="' || :old.UPDATEDDATETIME || '"/>' ||
    '</row>'
    ||
    '<row type="new">' ||
    '<column name="REFTYPECODE" value="' || :new.REFTYPECODE || '"/>' ||
    '<column name="REFTYPEDESC" value="' || :new.REFTYPEDESC || '"/>' ||
    '<column name="CREATEDBY" value="' || :new.CREATEDBY || '"/>' ||
    '<column name="CREATEDDATETIME" value="' || :new.CREATEDDATETIME || '"/>' ||
    '<column name="UPDATEDBY" value="' || :new.UPDATEDBY || '"/>' ||
    '<column name="UPDATEDDATETIME" value="' || :new.UPDATEDDATETIME || '"/>' ||
    '</row>'
    ||
    '</root>';

    Have a read through the Oracle® XML DB Developer's Guide - online copies of all Oracle documentation is available via http://tahiti.oracle.com
    Then explain your problem about building dynamic XML with a bit more detail. Why would you want to make the actual XML itself dynamic? The XML itself should follow a specific pre-defined template and then used to dynamically generate XML output as per this XML definition/template.
    Or am I missing something here?

  • How do i share content with my family without becoming responsible for payment of everybody's purchases? with familysharing i mean, not home sharing

    how do i share content with my family without becoming responsible for payment of everybody's purchases?
    with familysharing i mean, not home sharing
    i have set up a familyshare for my parents and 3 siblings, all mid twenties. everybody is used to paying their own way. how do i make that continue to be the case and still keep the sharing facility open?
    e.g I don't want to pay for my sisters' music purchases - half of it i don't like - but would like access to it now and then.

    -> Home Sharing is different than logging into the iTunes store.
    You enable Home Sharing using one AppleID. Doesn't matter which you use but all devices must use the same AppleID for Home Sharing.

Maybe you are looking for

  • How to display selected table fields in ALV report.

    Hi, I am displaying data from table EKPO using ALV through this query. select * from ekpo into table itab_ekpo up to 25 rows. bt if i need to display selected fields like select ebeln matnr netpr from ekpo into table itab_ekpo up to 25 rows. IT gives

  • Cat 4006 S3 - Attached hosts Net access very slow prior to reboot

    I have a CAT 4006 sup III running 12.1(11b)EW1 with a number of servers attached. Users started having problems accessing servers. After investigating all the impacted servers were connected to the same switch. The switch was appeared to be operating

  • Internal HD Not Recognized?

    In March, I bought a secondhand Macbook Pro mid-2010 from a friend (serial #73******ATN). It was working fine until this past week when I was using Gmail on Chrome and my browser froze. So I switched to a different application and a few seconds later

  • Urgent: Function GUI_DOWNLOAD can't create any data file!

    We are using this function GUI_DOWNLOAD to download internal table data to a flat file.  But after running the program, we got no any data file created!  The code is in the following: data : v_file type string. PARAMETERS: p_file(128) TYPE c OBLIGATO

  • \SOFTWARE Fatal Error

    I am using the latest HP SW from the web to install the drivers and SW for my All-In-One 5610 on my new Win 8.1 Pro PC. I get the following error "Could not write value to key \Software." The message also tells me to search for "Fatal Error" and "MSI