JDOM and schemas

Can someone explain to me how to validate a XML document against a schema using JDOM please ?
Thank's a lot

I see at this page that we must use the parser's setProperty(...) method to indicate where to find the schema.
But what I would like is that the parser find this information with the xsi:schemaLocation attribute of my root-element. Can I do that ?

Similar Messages

  • 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 .

  • Problem with JDOM and euro character

    Hi,
    I have an xml file including euro characters (�) and starting with :
    <?xml version="1.0" encoding="ISO-8859-15"?>
    as it should probably be.
    However, my problem is that (JDOM and) SAXBuilder doesn't recognize the euro characters and replace them by an unknown character '?'.
    What's wrong and how can I solve it?
    Thanks in advance.

    All right, this is a a part of my code:
    ....SAXBuilder builder = new SAXBuilder( true );
    //create the document
    //this doc contains this tag <RefVersion> data�data </RefVersion>
    Document doc = builder.build( "E:\\test.xml" );
    System.out.print( "before charAt = " + "�".charAt(0) + String.valueOf('\u20ac') );
    String str = "euro�euro";
    System.out.println( "euro�euro ->" + str.replace('\u20ac','O') );
    Element root = doc.getRootElement();
    //recup du noeud RefVersion
    Element version = root.getChild( "RefVersion" );
    str = version.getText();
    System.out.println( "nom= " + version.getName() + " data= " + str );
    System.out.println( "index de � ds euro�euro " + str.replace('\u20ac','O') );
    and the output is:
    before charAt = ��
    euro�euro ->euroOeuro
    nom= RefVersion data= data?data
    index de � ds euro�euro data?data
    So, obviously, it comes from JDOM.

  • How to know database name and schema name

    Hi ,
    Once after logging in the database,how is it possible to know the current database and schema which we r using?Is there any system table where we can get the database names and schema names?
    please help me out.itz urgent.
    Regards,
    Sravan

    Probably not.
    If the database name is the name of the current database, it would be essentially redundant. If the database name is the name of some other database, in order to get the names of all the tables in the specified schema, you could create a database link to the remote system (which assumes you have a login and password to the remote database with appropriate privileges, that the database server's tnsnames.ora file has an entry for the remote database, etc) and query the remote data dictionary tables. Even if you could do that, however, you could not dynamically create triggers on the remote database since DDL over a database link.
    In theory, you could also load an appropriate JDBC driver into the database and write a Java stored procedure that would connect to the remote database (again, with an appropriate user name & password, host name, and port number) and issue DDL against that remote database. I have a hard time believing, however, that this would be a particularly beneficial approach. It would be easier just to put the appropriate code into each database that needs triggers generated or to have a separate Java application that generates triggers for a number of different databases.
    Justin

  • How to know database name and schema name by providing package name?

    Hi,
    Could someonw will help me to get database name and schema name by providing package name ?
    I have used the query : select * from all_objects where object_name='Package_name'; but it simply returns schema name where as i need DB name and username.
    --Prajakta

    but it simply returns schema name where as i need DB name and username.
    i want to retrive the DB name for package name
    Based on your questions, I wonder if you are used to working in SQL Server? (The server, database, and schema are part of the 4-part  name of an object, independent of any user.)
    In SQL Server, schema and username are two separate physical concepts.  "Schema" is purely logical in Oracle: a user which owns objects is often called a "schema".
    In Oracle, "database" is roughly equivalent to the SQL Server concept  "server" (what you log in to).  It is not part of the naming path to a specific object  (unless there is a database link involved, but there is no indication that's what you have here).  In Oracle you connect to an Instance (or Service) and people often call this the "database", but there is a fine semantic distinction there (separate topic). 
    Once connected in Oracle, you fully-qualify an object by only a 2-part owner and object name (possibly 3-part if a database link is involved user.object@link).
    12c added another wrinkle to all of this, but I'll assume this question was more basic than that, because you likely would have mentioned if this was a 12c question.

  • What is the impact on an Exchange server when moving FSMO role and schema master into another DC?

    What is the impact on an Exchange server when moving FSMO role and schema master into another DC? What do we have to do on exchange after performing a such task?
    I had 1 DC (Windows server 2008 R2), 1 Exchange 2010 SP3. I install a new DC (Windows server 2008 R2). I then move all the FSMO role including the schema master role into the NEW DC. I check to be sure that the new DC is a GC as well.
    I shutdown the old DC and my Exchange server was not working properly and specially Exchange Management Shell. It start working again after I turn up the older DC.
    I am wondering why Exchange did not recognize the new DC, even after moving all the roles on it.
    I am looking to hearing from you guys.
    Thanks a lot

    if you only have 1 DC, you might need to cycle the AD Topology service after shutting the one down.
    Also, take a look in the windows logs, there should be an event where Exchange goes to discover Domain Controllers, make sure both are listed there.  You can probably force that by cycling AD topology (this will take all services down so be careful
    when you do it)
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread

  • Urgent :::::.i WISH TO DO THIS WITH JDOM and JAVA .

    file A.XML
    <XML>
    <TP>
    <FF>
    </FF>
    </TP>
    </XML>
    file B.XML
    <XML>
    <TP>
    <GG>
    </GG>
    </TP>
    </XML>
    I WANT TO PASTE node GG in b.xml to a.xml like this
    <XML>
    <TP>
    <FF>
    <GG>
    </GG>
    </FF>
    </TP>
    </XML>
    i WISH TO DO THIS WITH JDOM and JAVA .
    Please let me know how to do this ....
    i dont want to use XSL OR XSLT ...
    i am free for discussions...pls help me
    ciao

    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Workspace and Schema Guidance

    Hi - We're setting up Apex and want to plan out how to handle workspaces and schemas in advance. In previous settings, workspaces were set up by department with one schema. It started to get messy as more applications were built and development and production was all done in the same place.
    I was thinking that users could have their own development workspaces all associated with a development schema. Future workspaces would be created for each new project associated with the development schema previously mentioned and then separate workspaces for the project each associated with test and production schemas separately.
    I've read through related postings but hoped that someone might have comments/pros/cons this structure:
    WUser1Dev => SDevelopment
    (Continue for each individual developer using the same schema)
    WProject1Dev => SDevelopment
    WProject1Test => STest
    WProject1Production => SProduction
    (Continue for each individual Project using the same schemas)
    where W = Workspace and S = Schema

    Related thoughts here: Re: Workspace Guidance .
    Also consider that a dev-test-prod model where each is a separate database and in which workspace IDs are identical in each database (for each named workspace) is a whole lot easier to manage in terms of promoting revised applications and especially application components than a model in which dev-test-prod are separate workspaces that simply separate groups of developers from one another but where the applications within each workspace have functional counterparts in the others.
    Also, it is essential that applications that need to interact with one another at runtime, by sharing session state and certain authentication-related machinery must belong to a common workspace.
    Scott

  • DAD and schema in the URL

    Once I introduce the URL of a portal page,I don4t want to appear the dad and the schema in the URL, I want to appear only the address I introduced first.

    Can I create a new DAD and schema and change those parameters in the URL (dad, schema), so they are different from portal30/portal30?
    thanks in advance
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paul Encarnacion ([email protected]):
    The servlet that does the page construction requires the parameters in the URL.<HR></BLOCKQUOTE>
    null

  • Can i drop the connection user and schema used for Accociate repository

    Hi
    I have created a connection , user and schema and Associated repository to it then migrated a database from diffrent product. to oracle
    using the above mentioned connection, user ,schema and asscociated repositroy.
    11g XE.
    can i delete it after the migration.
    yours sincerely.

    Yes you can !. Permission to drop those artifacts is granted except the target schema where the converted objects are. The migration repository user/connection can be dropped.

  • Move users and schemas from one instance to another

    Hi, I'm starting out in a DBA position.
    My task at the moment is to move users and schemas from one instance to another.
    We're using 9.2.0.7.
    I have concluded that the following steps are necessary to move users and schemas from one instance to another :
    1. Create the needed tablespaces.
    2. Create the users that exist in the source instance
    3. Use exp to do a full export
    4. Use imp to re-create the schemas from the output file created by exp in step 3
    Am I missing anything ?
    Thanks,
    Gabriel

    3. Use exp to do a full exportInstead of doing a FULL export just export the users you want to move and imp that in other database using FROMUSER & TOUSER parameter.
    Daljit Singh

  • What are the steps are Shared services backup and schema back

    Hi
    I am new in Hyperion .. can anybody tell me what are the steps are in the shared services back up and schema back up ...
    Regards
    Praetorian

    If it is fora a demo i would advise you to extract all the files (metadata, Rule, Security, Data forms, Grids, ICP reports, Data etc) so that this can be restored on any machine from which you wish to give demo.
    If you which to take database backup it will take backup of all the HFM applications in that server. And when you restore the backup it will refresh all the applications which might result in changes to other applications which you may not want.
    For taking backup of database/schema go to the udl file and identify the schema for which you wish to take backup.
    Then type the command to take DB backup.
    Kindly mark the post helpful if you find so.
    Varun
    Edited by: Varun Kaushal on Apr 24, 2010 9:37 AM

  • Regarding PCRS and Schemas

    Hi All,
    I am excited to learn PCRS and schemas .., i have help documentation with me.
    But no idea how and where to start.
    Appreciate for the right advice.

    Hi Raja
    Check out links
    http://www.sd-solutions.com/documents/SDS_Payroll_Schemas.html
    http://www.insightcp.com/research.htm.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/4f/d51e68575e11d189270000e8322f96/frameset.htm
    I hope these will help you.
    ---Bob Radi

  • How to add dimension in dimension_values.csv and schema.csv file

    How to add  one dimension in dimension_values.csv and schema.csv file

    I'm not sure on the equation Ventzo, so please tell me if I've got this wrong.
    This should create a text file on the desktop with a name of the folder you are in plus the time.
    #target bridge
    if( BridgeTalk.appName == "bridge" ) { 
    var quadDetails = MenuElement.create("command","Get  Quadrature", "at the end of Tools","QuadDetails");
    quadDetails .onSelect = function () {
    var file = new File(Folder.desktop +"/" + decodeURI(Folder(app.document.presentationPath).name) + time() +".txt");
    file.open("w", "TEXT", "????");
    $.os.search(/windows/i)  != -1 ? file.lineFeed = 'windows'  : file.lineFeed = 'macintosh';
    file.open('w');
    var sels = app.document.selections;
    for(var a in sels){
    var myThumb = new Thumbnail( sels[a]);
    var Resolution = myThumb.core.quickMetadata.xResolution;
    if(Resolution == 0) Resolution = 72;
    var CM = Resolution /2.54;
    var m = CM*100;
    var Height = (myThumb.core.quickMetadata.height/m);
    var Width = (myThumb.core.quickMetadata.width/m);
    file.writeln(decodeURI(sels[a].spec.name) + " - " +(Height * Width).toFixed(4));
    file.close();
    alert(decodeURI(file.name) + "  Has been created on the Desktop");
    function time(){
    var date = new Date();
    var d  = date.getDate();
    var day = (d < 10) ? '0' + d : d;
    var m = date.getMonth() + 1;
    var month = (m < 10) ? '0' + m : m;
    var yy = date.getYear();
    var year = (yy < 1000) ? yy + 1900 : yy;
    var digital = new Date();
    var hours = digital.getHours();
    var minutes = digital.getMinutes();
    var seconds = digital.getSeconds();
    var amOrPm = "AM";
    if (hours > 11) amOrPm = "PM";
    if (hours > 12) hours = hours - 12;
    if (hours == 0) hours = 12;
    if (minutes <= 9) minutes = "0" + minutes;
    if (seconds <= 9) seconds = "0" + seconds;
    todaysDate = "-" + hours + "_" + minutes + "_" + seconds + amOrPm;
    return todaysDate.toString();

  • HR rules and schemas

    Hi,
    Anyone of you have a manual or instructions of HR rules and schemas?
    Thanks

    Hi,
    if you hven't done yet please visit
    rules
    http://help.sap.com/erp2005_ehp_02/helpdata/en/4f/d51fb2575e11d189270000e8322f96/frameset.htm
    schemas: 
    http://help.sap.com/erp2005_ehp_02/helpdata/en/4f/d51ca1575e11d189270000e8322f96/frameset.htm
    Regards
    Bernd

Maybe you are looking for