Creating XMLDocuments and setting their DTD

Hello,
i am exporting java objects to XML. I can construct a DOM with a XMLDocument and using its print method export it.
What i was unable to do so far was setting the DTD of these documents.
If i construct a parser, parse the DTD and then get the DTD via
Document doc = parser.getDocument() and
DocType dtd = doc.getDocumentType() how
do i set the DTD of the freshly constructed XMLDocuments to use this one in order to be able to check the correctness of the documents using this DTD at a later time?
Thanks.
Regards,
Dirk

Your method of getting the DTD object is correct. However, we do not do any validation while creating the DOM tree
using the DOM APIs. So setting the DTD in the Document will not help in validating the DOM tree that is constructed.
The only way to validate an XML file is to parse the XML document using DOMParser or SAXParser.
Oracle XML Team
null

Similar Messages

  • Help creating apple script to create folder and set access levels

    I'm trying to create folders in FileMaker Pro using apple script and need some help in setting the access level for the folders.  I want to set both Staff and everyone to Read and Write access.   Secondly I would like to have a function key set on the desktop to create new folders and set that same access level.  The default access is Read and I can not find a way to change that.
    Thanks

    I'm trying to create folders in FileMaker Pro using apple script and need some help in setting the access level for the folders.  I want to set both Staff and everyone to Read and Write access.   Secondly I would like to have a function key set on the desktop to create new folders and set that same access level.  The default access is Read and I can not find a way to change that.
    Thanks

  • Creating group and setting owner

    Hello,
         When I am trying to create a group, FIM is picking up the my account (in which I am logged in) and setting that as the owner of a group unless I manually delete that and put another user as the owner. Can we change the settings somewhere
    so that it doesn't take the default logged in account?
         Please let me know, Any help will be much appreciated.
    Thanks.

    Hello,
    as far as I know that functionality his some code behind which can not be changed.
    But you can Trigger a workflow to clear the owner attribute on group creation.
    Keep in mind that reference values can only be cleared by setting a " " (space) to the attribute by using the function evaluator.
    Regards
    Peter
    Peter Stapf - ExpertCircle GmbH - My blog:
    JustIDM.wordpress.com

  • Create Parameter  and set Parameter properties using API

    I want to create a parameter with RAS API.
    Here I want to create a string parameter and initialize it and set the values.
    This is the code I use to create a parameter.
    I use here the RAS API, because I want to create a parameter
            Dim myParameterField As New CrystalDecisions.ReportAppServer.DataDefModel.ParameterField
            myParameterField.ParameterType = CrParameterFieldTypeEnum.crParameterFieldTypeReportParameter
            myParameterField.ValueRangeKind = CrParameterValueRangeKindEnum.crParameterValueRangeKindDiscrete
            myParameterField.Type = CrFieldValueTypeEnum.crFieldValueTypeStringField
            myParameterField.Name = "mystring"
            m_RasDoc.DataDefController.ParameterFieldController.Add(myParameterField)
    later, I call the following code to set the values of the parameter "mystring".
    I use DOTNET-SDK, because I dont know how to do this with the RAS API
            Dim crParameterDiscreteValue As ParameterDiscreteValue
            Dim crParameterFieldDefinitions As ParameterFieldDefinitions
            Dim crParameterFieldLocation As ParameterFieldDefinition
            Dim crParameterValues As ParameterValues
            crParameterFieldDefinitions = m_crNetDoc.DataDefinition.ParameterFields
            crParameterFieldLocation = crParameterFieldDefinitions.Item("mystring")
            crParameterValues = crParameterFieldLocation.CurrentValues
            crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
            crParameterDiscreteValue.Value = "myvalue"
            crParameterValues.Add(crParameterDiscreteValue)
            crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
            crParameterFieldLocation.ApplyDefaultValues(crParameterValues)
            crParameterFieldLocation.IsOptionalPrompt = False
    later, I save this report to disk.
    When I open the generated report in the Crystal Designer, there are no default values for this created parameter 'mystring'.
    Is it possible to set DefaultValues using RAS API?
    Can I populate the combobox for a parameter in parameter Dialog? Can I set the standard value field?
    Thank you
    Otto

    Hello,
    at first i want to create a new parameter. Then set the parameter value in the parameterlist and store a standard default value.
    I want if this stored report will be opened with the Crystal Reports Designer and I start with the view button, the default values should be set in the parameter text field, so that the user must not type in the parameter values.
    Please help me!
    Thank to all helpers.

  • Creating Items and setting the properties programtically

    Hi ,
    Can any one provide me some details of how to create item programatically and setting its properties.
    Ex: I have to create a message choice
    set its id, picklist view definition ,picklist display attribute, picklist value attribute, prompt, action type and event
    Regards,
    Krishna

    Hi Krishna,
    OAMessageChoiceBean abc = (OAMessageChoiceBean) createWebBean
    (pageContext, MESSAGE_CHOICE_BEAN);
    abc.setPickListViewUsageName("ListVO");
    abc.setListValueAttribute(" ");
    abc.setListDisplayAttribute(" " );
    abc.setID("ID");
    this wl help u I guess..
    for more details Refer JDev Guide.

  • Create profile and set console font

    Hi,
    I'm not really a powershell expert, even though i use it daily. I've been looking into creating a profile to make life easier. So i made a little script to auto create a profile and set the console properties, load some modules etc.
    The one thing i have not found an answer for is how can i set the console to use Lucinda Console font in stead of that dreadful raster font?
    This posting is provided "AS IS" with no warranties or guarantees and confers no rights

    Hi,
    Thanks. I am aware of the console settings available to powershell, but thanks anyway.
    So the reg settings should be stored for the current user only in the key HKCU\Console. That will only affect the logged on user. It is not dynamic, as you say, but that's ok. I just need to have it set.
    So changing the following settings would change the font for CMD.exe and powershell.exe:
    REG ADD HKCU\Console /v FaceName /d "Lucida Console" /f
    REG ADD HKCU\Console /v FontSize /t REG_DWORD /d 0x000c0000 /f
    REG ADD HKCU\Console /v FontWeight /t REG_DWORD /d 0x00000190 /f
    REG ADD HKCU\Console /v FontFamily /t REG_DWORD /d 0x36 /f
    Push-Location
    Set-Location HKCU:\Console
    New-Item ".\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe"
    Set-Location ".\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe"
    New-ItemProperty . FaceName -type STRING -value "Lucida Console"
    New-ItemProperty . FontFamily -type DWORD -value 0x00000036
    New-ItemProperty . FontSize -type DWORD -value 0x000c0000
    New-ItemProperty . FontWeight -type DWORD -value 0x00000190
    New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000
    New-ItemProperty . QuickEdit -type DWORD -value 0x00000001
    Pop-Location
    Push-Location
    Set-Location HKCU:\Console
    New-Item '.\%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe'
    Set-Location '.\%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe'
    New-ItemProperty . FaceName -type STRING -value "Lucida Console"
    New-ItemProperty . FontFamily -type DWORD -value 0x00000036
    New-ItemProperty . FontSize -type DWORD -value 0x000c0000
    New-ItemProperty . FontWeight -type DWORD -value 0x00000190
    New-ItemProperty . HistoryNoDup -type DWORD -value 0x00000000
    New-ItemProperty . QuickEdit -type DWORD -value 0x00000001
    Pop-Location
    So, that should've done the trick. I can open cmd.exe and powershell.exe, open the system menu, go to defaults, and verify that the settings are in fact set. However, the settings just doesn't take effect. I even opened the properties dialog box for the
    PowerShell shortcut, to check the settings and I can still confirm that it had set the font correctly.
    Still, whenever I launch PowerShell, I am greeted with the ugly raster font. So, the last check I did was to go into properties in the PowerShell window system menu, and check the font.
    It was set to raster. So I changed it. The next time I opened PowerShell, it was back to raster.
    So, no matter where I set it, or what I set, it still goes back to raster every da** time.
    Where i come from, we call this a bug... A very annoying bug...
    Edit: Btw, this is only happening on a handful of servers, not all. On some i am able to successfully script changing the font.
    This posting is provided "AS IS" with no warranties or guarantees and confers no rights

  • How can I merge cells and set their row hight in numbers with applescript

    Hi,
    I have a table in numbers that looks like this (but without header):
    Column A
    1
    1 ABC GHDD
    2
    efgh dhdh
    3
    lmnk hdjdhj
    4
    5
    2 HGJKSKJHD
    6
    HKD KIEIJE JEIj
    7
    G8DIHE  EO E PE
    8
    GDDH OEJ EEF
    9
    10
    3 DHKJDH  D JH D KJH D
    11
    I want to merge all the cells that belong to a number with the following cells until an empty cell comes. In this example cells 1-3, 5-8. After I merged these I want to set their height to 1.
    Is this possible with apple script? I tried it, but apple script says "can't get height".
    Do you guys have any idea?
    Thanks Frieddy

    Thanks for the reply!
    I want to merge just the rows, there is only one column (I had to do the number column in the example to point to the rows I meant).
    I would like the whole thing to look like this:
    1
    1 ABC GHDD
    efgh dhdh
    lmnk hdjdhj
    2
    2 HGJKSKJHD
    HKD KIEIJE JEIj
    G8DIHE  EO E PE
    GDDH OEJ EEF
    3
    3 DHKJDH  D JH D KJH D
    Frieddy

  • Create form and set rules

    Hi
    I want to create for example Request
    Shipping form.
    i was create a form and publish to a SharePoint library.i was set the  Repeating Section
    for choice commodityand its price.
    users can select any number commodity. but i have two request:
    1- the user do not have ability to select
    same commodity within a
    dayaccording to picture.
    2- when select some commodity, in Final Price control we have a total price.

    Hi Yuzarsiv, to check for duplicate entries, you should use an event receiver (first link below). To total the prices, see the second link. The third link is for additional reference.
    https://salnikan.wordpress.com/2011/07/26/prevention-of-duplicate-entries-based-on-two-or-more-columns-in-a-sharepoint-list/
    https://support.office.microsoft.com/en-us/article/Add-the-values-in-one-or-more-columns-of-a-repeating-table-or-section-3bdc1062-5352-49d4-a851-d7719b016443?CorrelationId=dcd2f32c-5cf4-4e1a-9f16-ed005ccb4fa1&ui=en-US&rs=en-US&ad=US
    http://www.bizsupportonline.net/use-repeating-tables-infopath.htm
    cameron rautmann

  • HT204053 We have apple computer and set up 1 apple id and for music on iPods.  Now we have 3 apple phones and want to share the music but keep our contacts separate. what should we do.

    We started with an apple computer and set up 1 apple id and for music on iPods.  Now we have 3 apple phones and want to share the music but keep our contacts separate. what should we do? Right now we have the same apple id on the PC, ipodtouch, ipod, and 3 phones.  They said make seperate clouds?

    Hello there MizzouTrojan,
    If I understand correctly you want all 6 devices to have access to a single calendar that each device gets notifications for and can edit. You can do that with an private iCloud shared calendar. First sign into www.icloud.com and use these steps from the following article to share a calendar:
    iCloud: Share a calendar with others
    Share a calendar privately
    Click the Share button to the right of the calendar name in the sidebar, then select Private Calendar.
    Note:    You can also share the same calendar publicly. For instructions, see the next task, “Share a calendar publicly.” 
    Type the invitee’s email address in the Add Person field and press Return.
    Click the pop-up menu with the invitee’s name and choose access privileges (View & Edit or View Only). 
    For each person you want to share the calendar with, repeat steps 2 and 3.
    When you’ve invited everyone and set their privileges, click OK.
    Invitation emails are sent from your iCloud email address to the participants you specified.
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • Creating Diagram and model file programmatically

    Hi,
    Am trying to create the Diagram and model file programmatically.
    I used the code similar to what is there in XXDiagramEditorUtil.createDiagram().
    In the normal case (when i have an empty domain ie nothing is set into the domain object), the diagram and the domain file gets created and works fine.
    Assume my model is of type XX, and that has a list of YY.
    i create YY and set it inside XX.
    Now when i create the domain file, the <YY> is set correctly inside <XX>.
    But in the diagram file, i dont see the <children/> tags corresponding to the YY.
    How would the appropriate <children/> tags be generated ?
    i tried diagram.createChild(yy.eClass()), but the diagram file does not get generated.
    Pls help.
    AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
    Messages.XXXDiagramEditorUtil_CreateDiagramCommandLabel,
    Collections.EMPTY_LIST) {
    protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
    XXX model = createInitialModel();
    YYY yyy = XXXFactory.eINSTANCE.createYYY();
    yyy.setAttribute1("2");
    yyy.setAttribute2("name");
    model.getYYYs().add(yyy);
    attachModelToResource(model, modelResource);
    Diagram diagram = ViewService.createDiagram(model, XXXEditPart.MODEL_ID,XXXEditorPlugin.DIAGRAM_PREFERENCES_HINT);
    if (diagram != null) {
    diagramResource.getContents().add(diagram);
    diagram.setName(diagramName);
    diagram.setElement(model);
    //diagram.createChild(yyy.eClass());
    //diagram.insertChild(arg0);
    try {
    modelResource.save(.getSaveOptions());
    diagramResource.save(getSaveOptions());
    } catch (IOException e) {
    return CommandResult.newOKCommandResult();

    Hi ganesh,
    you have two options to get it working.
    The first one is using a CanonicalEditPolicy, which creates all Nodes and Edges for you based on your semantic model. This is easy to implement, but it has some drawbacks. Your editor will get dirty after opening it, because your Notation Model is changes and no layout information is available.
    The better way is to create Nodes and Edges for each semantic element you created.
    For your code snippet it might look like this:
    XXX model = createInitialModel();
    YYY yyy = XXXFactory.eINSTANCE.createYYY();
    yyy.setAttribute1("2");
    yyy.setAttribute2("name");
    model.getYYYs().add(yyy);
    attachModelToResource(model, modelResource);
    Diagram diagram = ViewService.createDiagram(model, XXXEditPart.MODEL_ID,XXXEditorPlugin.DIAGRAM_PREFERENCES_HINT);
    Node yyyView = ViewService.createNode(diagram, yyy, SemanticHints.YYY,
    ,XXXEditorPlugin.DIAGRAM_PREFERENCES_HINT);
    //Set some layout information assuming you use a XYLayout
    Bounds bounds = NotationFactory.eINSTANCE.createBounds();
    bounds.setX(70);
    bounds.setY(20);
    yyyView.setLayoutConstraint(bounds);
    Regards,
    Andreas

  • New to the Apple and I want to set up a user account that will not delete the guest users files and allow and preserve their personal settings after log out. Is this possible?

    New to the Apple and I want to set up a user account that will not delete the guest users files and allow and preserve their personal settings after log out. Is this possible?

    The built-in guest user account will not do this. Simply create a new standard account and call it "Guest" or "Guest Users" or whatever you like.
    Go to System Preferences > Users& Groups, click "+" to make a new account.

  • AutoScrolling of PanelLayout and setting Location of dynamically created controls

    Hi, I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up.
    So basically I have wrote a code that lets me drag on control over other other and replace their's locations.
    So I wanted to add possibility for user to dynamically add new controls (every new control is suppose to be 200px below previous) - everything is fine as long as I add them from upper section of my LayoutPanel (without scrolling) but when I try to add
    them while I'm half dawn scrolled they are placed based on CURRENT left upper corner which is NOT a upper left corner of LayoutPanel therfore they are placed with wrong padding based on current scrolled position.
    So my question is how can I avoid it and always add new controls based on LayoutPanel upper left corner? (I have already tried disabling AutoScroll while adding new control and enabling it back after adding - it works but I want to find PROPER way because
    I'm sure there must be some kind of solution to it)
    Thanks in advance.

    Hi darekg11,
    >> I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up
    I am wondering what the PanelLayout was, was it a “flowLayoutPanel” or “tableLayoutPanel”?
    >> basically I have wrote a code that lets me drag on control over other other and replace their's locations
    Did you mean you drag the control at runtime or at design time?
    >> how can I avoid it and always add new controls based on LayoutPanel upper left corner
    I could not reproduce your issue, and could you share us some key code or a simple demo to reproduce your issue?
    I made a research about “scrolling panel”, and I think the link below might be useful to you:
    # Scrolling Panel
    http://www.codeproject.com/Articles/226381/Scrolling-Panel
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Create and set key TNS_ADMIN?

    1. Create a directory to be used for the Oracle Net configuration files, and set
    the TNS_ADMIN variable to point to this. It doesn’t matter where the direc-
    tory is, as long as the Oracle user has permission to create, read, and write it.
    On Linux:
    mkdir /u01/oracle/net
    export TNS_ADMIN=/u01/oracle/net
    Ensure that all work from now is done from a session where the variable has
    been set.
    On Windows:
    mkdir d:\oracle\net
    Create and set the key TNS_ADMIN as a string variable in the registry in
    the Oracle Home branch. This will typically be
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb1g_home1
    OK...in my little window CLI window I did the mkdir. HOW..HOW do I create and set the key TNS_ADMIN as a string variable. I have tried a few ways but I don't think i am doing it correctly. Please help.
    Donna

    Ed is actually one of the nicer, more helpful people here. Please understand, there are a lot of posts from people who expect volunteers to do their work for them, including students who expect people to do their schoolwork for them. That is highly discouraged. We do want to help, so that often winds up being a pointer to how to find the answer (the "teach a person to fish" idea). Please don't take it personally. There are nasty and rude people here, but they normally pop up reactively, in response to obvious abusers. What is obvious to some people is not to others.
    When someone asks for more information, you should give it, they are trying to help, not generally being passive-aggressive. See http://www.catb.org/esr/faqs/smart-questions.html
    People are here for all different reasons, and there is a lot of depth to their experience. You have a learning curve ahead, both for how to deal with Oracle and how to do deal with online communities. Patience, dedication and hard work pay off. Most have made the mistakes you are going to make, so consider advice, even apparently rude advice, helpful.
    You only have to create one account. You then log on using it again. It actually spreads across many different sites (this is called SSO, Single Sign On).
    Edit: By the way, sb gave the correct answer 5 minutes after your first post.
    Edited by: jgarry on Oct 30, 2012 10:57 AM

  • How can I re-arrange the pages in a Pages document now?? I used to be able to click on the thumbnails and shift their position which is important in creating documents.  Any ideas?

    How can I re-arrange the pages in a Pages document now?? I used to be able to click on the thumbnails and shift their position which is important in creating documents.  Any ideas?

    This feature has been removed from Pages 5 along with over 90 others:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&mforum=iworktipsn trick
    Pages '09 is still in your Applications/iWork folder.
    Trash/archive Pages 5 and rate/review it in the App Store.
    Peter

  • Automatically create a custom VPN connection and set default wallpaper in a deployment...

    Hey guys,
    I've been hard at work on creating a custom deployment for our company to allow us to start rolling out Windows 7 at the first of next month. I demonstrated it to the brass today and they were blown away. All they asked for was two changes and I admit I'm stumped. Hopefully someone here can help:
    1 - Set Default Wallpaper for *all* users: I've written a script to copy our company wallpaper to "C:\Windows\Web\Wallpaper" during a deployment. Is there any way I can modify that script to set that wallpaper as default for anyone who logs into that computer. Or if there's a non-script way to do this I'm all ears. I just need that wallpaper as default.
    2 - Create a VPN Connection for our company intranet: Right now this is being done manually in the Network and Sharing Center. All they are doing is choosing "Set up a new connection or network" >> "Connect to a workplace" >> "Use my Internet Connection (VPN)" and just entering our VPN server IP Address and giving the connection a name. Surely there has to be a way to automate this with a script or something? Can anyone help?
    3 - BONUS: This is just gravy, but if anyone can tell me how to "silently" or "automatically" disable the "Highlight newly installed programs" checkbox for all users using a script or something, that would be *wonderful*.
    Can anyone help me here?

    1. Go here http://blogs.technet.com/deploymentguys/archive/2008/06/06/useful-script-number-5-adjusting-the-default-user-registry-hive.aspx . There is a script that will set your default wallpaper for you.
    2. Does your company use a VPN client?
    3. This option is set in the Registry. You could create a startup script or add this to your Task Sequence. Create the Dword and set it to 0 to disable highlighting.
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Start_NotifyNewApps
    Rich
    http://deploywindows7.wordpress.com/
    Thanks for responding Rich,
    1. I actually came across that script when I was poking around the Deployment guys forums, but I noticed that it did a lot more than just set the Wallpaper. I was trying to "keep it simple" plus the registry editing sort of made me nervous. I guess I can give it a go and see if it can be made to work for me.
    2. Our company dos not use a VPN client. If you look back at my description of the process in bullet point #2 we are just using the Network and Sharing Center that is built into Windows 7 to create a simple VPN connection. That's why I'm so certain there has to be a way to automate this process. ll we are doing is entering an IP Address and giving the connection a name. Surely I can script that, or is there maybe some way to create the connection on one computer and save it as a file that I can then copy to each machine during my deployment?
    3. Thanks for answering my bonus one too. Please forgive my ignorance because I am new to a lot of this. I assume I can create a "file" with the proper registry settings that can be applied during deployment right? I've seen people crate files that do this and use the .reg extension. Do you know how to make one of these or can you link me to a tutorial that steps me through it?
    You could always edit the script to leave the other parts out.  Thanks for the clarification on the VPN Client, just wanted to make absolutely sure. Let me know how if the process you found works for you.
    For the reg key, you would want to create the key I described, add it to your scripts directory, and then add a Client Build Custom Task in StateRestore to set the key in the registry. You can do this by adding a RunLineCommand to the Task Sequence. Then the command would look like this
    cmd /c regedit /s %deployroot%\scripts\NameOfRegKey.reghttp://deploywindows7.wordpress.com/

Maybe you are looking for

  • *How to download a list into Excel/Notepad which should be Read only type*

    Hi All ,I have a requirement to Download the Report list to a Hardcoded path ie., this path should not change if a user tries to change and the File which gets downloaded should be automatically created as Read-Only.This is an Urgent requirement,kind

  • Can someone please help me understand this? About Apple Repairs

    Hello everyone, I bought my macbook in Nov. 2009 in USA. I just moved to India and I've noticed the rubber base coming off and the infamous apple hairline crack. When I first took it to the India center, they kept insisting I had to pay for repair, I

  • Frame 12 install options question

    In the Frame 12 install, a box comes up with Options: -Adobe Framemaker 12  1.3 GB On the side panel is a tick box with Adobe Framemaker and then indented under that is Adobe PDF Creation Add-On XI 156 MB -Adobe ExtendScript Toolkit CC Here are my qu

  • A project I've been working on for months crashed and now I can't open it.

    I had two external hard drives hooked up to backup a project. I backed it up so it was on both drives and tried to open it from one of the drives. I wasn't thinking and had both drives still hooked up. I am guessing this was the problem. Now when I t

  • How to mail the html file using javamail????

    hi i have captured the output of a jsp page in a html file.... now i wish to send it in the mail ( *** not as an attachment) ie i wish the output of the jsp ie the html file to be displayed in the message box (ie text area) ..... and then when reciev