How to get the content of a DTD ?

(i'm French, please excuse my English)
I'm trying to get the content of the DTD corresponding to the file "fic"
fic is like : "....../XXXXXX.xml"
and contains : <!DOCTYPE composants SYSTEM "test.dtd">
Here is my code :
org.w3c.dom.Document Doc = DBXML.newDocument();
Doc = DBXML.parse(fic);
//Doc is a correctly parsed Document
org.w3c.dom.DocumentType DT = Doc.getDoctype();
System.out.println(DT.getSystemId());
//echo : "test.dtd" so I think that DT is good
System.out.println(DT.getNodeType());
//Echo "10" ==> DocumentType Node
System.out.println(DT.getNotations().getLength());
//Echo "0" !!!!!!!!!
I can't figure why getNotations() can't give me the DTD definitions
Please tell me if I try to use a wrong way or if I missed something.
Thanks a lot ...

getNotations() method returns Dtd NOTATIONS when the NOTATIONS are referenced in the DTD.
Dtd:
<!ELEMENT map (entry*) >
<!ELEMENT entry (#PCDATA)>
<!ATTLIST entry value NOTATION (n1|n2) #REQUIRED>
<!NOTATION n1 SYSTEM "n1-url">
<!NOTATION n2 SYSTEM "n2-url">
/* getNotation() returns NamedNodeMap*/
DocumentType docType=xmlDocument.getDoctype();
System.out.println(docType.getName());
NamedNodeMap nnm=docType.getNotations();
System.out.println((nnm.item(0)).getNodeName());
System.out.println((nnm.item(1)).getNodeName());
System.out.println(docType.getNotations().getLength());
Output:
map
n1
n2
2

Similar Messages

  • I am thinking of buying a MacBook Air and am wondering how to get the content of my iPad into iTunes.

    I have iTunes on an old pc and am thinking of buying a MacBook Air. I am wondering how to get the content of my iPad on to the Mac as I know that sync only happens in one direction, from pc to device. I assume therefore that when I attach my pad to the new Mac it will sync to an empty iTunes and I will have lost all the content of my pad. I know I can restore purchases, but what about contacts, calendar, photos and music not purchased from apple. I have a fairly recent backup on a pen drive but it is a usb2 device and is formatted for a pc. Any advice would be appreciated.

    Do I copy my media library or from a backup.  I have a backup on my pc and on an external drive. This drive is usb2 and formatted for windows so I can't connect it to a MacBook Air to make the transfer.  Equally I don't think there is a way to connect the 2 computers via a cable ie usb2 one end and usb3 the other.  Will the computers talk to each other via wifi if I enable home share although I think this is only for music which still leaves contacts, mail etc.
    I am sorry to be such an ignoramus but any further help would be appreciated.

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

  • How to get the content of the uploaded file.

    Hi Experts,
    I am using a input box to get the path of the file to be uploaded.(I am not using FILE UPLOAD UI Element).Could you please let me know how to get the content of the uploaded file.
    Regards,
    Arun

    >
    ARUN KUMAR.S wrote:
    > Hi Experts,
    >
    > I am using a input box to get the path of the file to be uploaded.(I am not using FILE UPLOAD UI Element).Could you please let me know how to get the content of the uploaded file.
    >
    > Regards,
    > Arun
    You will not be able to use a normal InputField to upload file contents.  This is not allowed by the browser security model. You must use one of the upload specific UI mechanisms - the FileUpload UI element or as of 7.01 ACFUpDownload or FlashIslands.

  • How to get the contents associated with a component.

    How to get the contents associated with a component.
    Like i have 2 buttons and i want to get the contents associated with these button without clicking them i.e without firing the event.
    By Contents i mean, whatever things we get after firing the event,we get some other window and some thing is added to the current page and so on.

    grab all the code inside the actionPerformed(ActionEvent e) method

  • How to get the content of a jTextArea?

    hi everyone
    can some body provide me with some help???
    I want to know how to get the content of a jTextArea
    it may be a String and i want to use that String to make some applications
    I've use this :
    String ch=jTextArea.getSelectedText()
    but i'm not sure it will work and i'm not sure it will take the text writen inside the jTextArea ... please help
    Thanks

    http://forum.java.sun.com/thread.jspa?threadID=778988&tstart=0

  • WD ABAP: How to get the contents of selected table lines?

    Hi,
    I'm trying to figure out how to get the contents of table lines back from the UI. I display a table with several lines of data. The user selects some rows. I want to move the contents of the selected rows to another table. I have a context attribute, say DATA, with attributes FIELD1... FIELDn, using a DDIC structure. These are bound to the table UI element and the corresponding table columns. To get the selected rows, I use wd_context->get_selected_elements(). This works, but what I get from this method is references to if_wd_context_element. How do I know which row (row number = ?) this corresponds to? And how do I get the actual data? I want a structure with FIELD1 = value1 FIELD2 = value2 etc. My context attributes FIELD refer to table columns, but I'm looking for the table line...
    Can somebody help me?
    Thanks,
    Ira

    Hi Ira,
    wd_context->get_selected_elements() returns WDR_CONTEXT_ELEMENT_SET which is a table type of IF_WD_CONTEXT_ELEMENT. You can loop through the WDR_CONTEXT_ELEMENT_SET, get into variable say node_elelement which is of type ref to If_Wd_Context_Element. Then you could use the method GET_STATIC_ATTRIBUTES of If_Wd_Context_Element which returns a structure with values of all the attributes in the selected row.
    If you need the row number, while populating the node you could have an additional attribute called rowno and populate it correctly. When you select the data using method GET_STATIC_ATTRIBUTES, you would get the appropriate row number.
    Regards,
    Srini.

  • How to get the contents of more than one comments of human task?

    The human task have more than one comments. I use the following functions to get the contents but still only get the first comment. Append function only returns the first comment.
    How to get all conents of comments?
    <while name="While_1"
    condition="bpws:getVariableData('Variable_int_i')&lt;number(bpws:getVariableData('Variable_comment_node'))">
    <sequence name="Sequence_3">
    <sequence name="Sequence_3">
    <assign name="Assign_7">
    <copy>
    <from expression="string(bpws:getVariableData('single_approve_1_globalVariable','payload','/task:task/task:userComment/task:comment'))"/>
    <to variable="Variable_comment_string"/>
    </copy>
    </assign>
    <assign name="Assign_6">
    <copy>
    <from expression="bpws:getVariableData('Variable_int_i')+1"/>
    <to variable="Variable_int_i"/>
    </copy>
    </assign>
    </sequence>
    </sequence>
    </while>

    You also have to test the value:
    REPORT ztest MESSAGE-ID 00.
    DATA: BEGIN OF itab OCCURS 0,
            f1 TYPE i,
            f2 TYPE i,
            f3 TYPE i,
            f4 TYPE i,
          END OF itab.
    DATA: sel_field(20),
          value TYPE i.
    DO 5 TIMES.
      itab-f1 = sy-index.
      itab-f2 = sy-index + 10.
      itab-f3 = sy-index + 20.
      itab-f4 = sy-index + 30.
      APPEND itab.
    ENDDO.
    LOOP AT itab.
      WRITE: /001 itab-f1, itab-f2, itab-f3, itab-f4.
      HIDE itab.
      CLEAR itab.
    ENDLOOP.
    AT LINE-SELECTION.
      CLEAR: sel_field,
             value.
      GET CURSOR FIELD sel_field.
      IF sy-subrc = 0.
        CASE sel_field.
          WHEN 'ITAB-F1'.
            value = itab-f1.
          WHEN 'ITAB-F2'.
            value = itab-f2.
          WHEN 'ITAB-F3'.
            value = itab-f3.
          WHEN 'ITAB-F4'.
            value = itab-f4.
        ENDCASE.
        MESSAGE s001 WITH 'Value of' sel_field 'is' value.
      ELSE.
        MESSAGE s001 WITH 'Invalid field selected'.
      ENDIF.
    Rob

  • FavoriteFolder, how to get the content inside this folder

    Hi
    I have to get with the Java api consumer the content inside the favorite folder. How can i get it?
    i write this code:
                   String searchQuery = search://{'guaglanto1'}?SearchKeywords=true&SearchExact=true&SearchCaseSensitive=true;
                   ResponseHolder rh = boBIPlatform.get(searchQuery, null);
                   InfoObjects myFav = rh.getInfoObjects();
                   if (myFav == null || source.getInfoObjectArray().length == 0){
                     result="No terms matching the following search query could be found: " + searchQuery;
                             return result;
                   result ="";          
                   for (InfoObject infoObject: myFav.getInfoObjectArray()){
                     result= result+ infoObject.getName() + " has CUID: " + infoObject.getCUID()+ " type "+ infoObject.getKind() + " has childreen "+ infoObject.getChildrenObjects();
    Where guaglanto1 is the title of the favoriteFolder.This code show the CUID,name,kind and children of the favoriteFolder.  Now i want to navigate this folder and get its content (i see from InfoViewApp there are 5 web intelligent report inside the favorite folder) but i don't know how can i get that.
    Anyone can help me to resolve this problem?
    thank you
    best regard
    Andrea

    once you get the SI_ID or SI_CUID of the favorites folder you need to write an additional query to pull all its children using:
    select * from ci_infoobjects where si_parentcuid='<si_cuid of favorites folder>'
    If the favorites folder contains folders with subfolders, this will be a recursive call. You can use query://{select....} or path://
    Look at the BIPlatform documentation in API reference and there is more information on how to use query:// or path://

  • How to get the content of a website to a txt file via powershell

    Hello,
    I have a reporting server that creates a report to a URL, by running multiple .xsl files. I want to be able to gather the data in the URL and convert it to csv or txt file via powrshell.
    Again I want the data inside the URL, I've been playing around Net.Webclient but I'm not getting what I need.

    If you're using PowerShell 3.0 or later you can try using Invoke-WebRequest.
    This previous thread shows how you can download the content from the page.
    Without knowing what type of content (i.e. text vs images vs other objects) is on the page it's hard to say if this will work for you.
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • HTML Client: How to get the content/value of a custom control?

    I made two Custom Controls named, "CustomControl_1" and "CustomControl_2". 
    In the render function of "CustomControl_1", how to access the value of "CustomControl_2"?
    For example,
    myapp.BrowseOrders.CustomControl_2_render = function (element, contentItem) {
    $(element).text("Some Value");
    myapp.BrowseOrders.CustomControl_1_render = function (element, contentItem) {
    $(element).text( Value of CustomControl_2 ? );

    I would recommend creating screen properties and binding the controls to those screen properties. Then you can easily get a reference to any value. See this article for an example of the process using custom controls:
    Using The Clippy Agent in the Visual
    Studio LightSwitch HTML Client
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • How to get the content of message in the mail body

    Hi,
    Can anyone suggest me to get the message content as the mail body using messagetTransformation bean????

    Hi
    In the Receiver Mail Adapter use these settings
    Message Protocol:XIPAYLOAD
    and tick on Use mail package.
    Gt back if you have more doubts
    Thanks

  • How to get the content of text file to write in JTextArea?

    Hello,
    I have text area and File chooser..
    i wanna the content of choosed file to be written into text area..
    I have this code:
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.*;
    public class Test_Stemmer extends JFrame {
    public Test_Stemmer() {
    super("Arabic Stemmer..");
    setSize(350, 470);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setResizable(false);
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    JButton openButton = new JButton("Open");
    JButton saveButton = new JButton("Save");
    JButton dirButton = new JButton("Pick Dir");
    JTextArea ta=new JTextArea("File will be written here", 10, 25);
    JTextArea ta2=new JTextArea("Stemmed File will be written here", 10, 25);
    final JLabel statusbar =
                  new JLabel("Output of your selection will go here");
    // Create a file chooser that opens up as an Open dialog
    openButton.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent ae) {
         JFileChooser chooser = new JFileChooser();
         chooser.setMultiSelectionEnabled(true);
         int option = chooser.showOpenDialog(Test_Stemmer.this);
         if (option == JFileChooser.APPROVE_OPTION) {
           File[] sf = chooser.getSelectedFiles();
           String filelist = "nothing";
           if (sf.length > 0) filelist = sf[0].getName();
           for (int i = 1; i < sf.length; i++) {
             filelist += ", " + sf.getName();
    statusbar.setText("You chose " + filelist);
    else {
    statusbar.setText("You canceled.");
    // Create a file chooser that opens up as a Save dialog
    saveButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    JFileChooser chooser = new JFileChooser();
    int option = chooser.showSaveDialog(Test_Stemmer.this);
    if (option == JFileChooser.APPROVE_OPTION) {
    statusbar.setText("You saved " + ((chooser.getSelectedFile()!=null)?
    chooser.getSelectedFile().getName():"nothing"));
    else {
    statusbar.setText("You canceled.");
    // Create a file chooser that allows you to pick a directory
    // rather than a file
    dirButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    JFileChooser chooser = new JFileChooser();
    chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    int option = chooser.showOpenDialog(Test_Stemmer.this);
    if (option == JFileChooser.APPROVE_OPTION) {
    statusbar.setText("You opened " + ((chooser.getSelectedFile()!=null)?
    chooser.getSelectedFile().getName():"nothing"));
    else {
    statusbar.setText("You canceled.");
    c.add(openButton);
    c.add(saveButton);
    c.add(dirButton);
    c.add(statusbar);
    c.add(ta);
    c.add(ta2);
    public static void main(String args[]) {
    Test_Stemmer sfc = new Test_Stemmer();
    sfc.setVisible(true);
    }could you please help me, and tell me what to add or to modify,,
    Thank you..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    realahmed8 wrote:
    thanks masijade,
    i have filter the file chooser for only text files,
    but i still don't know how to use FileReader to put text file content to the text area (ta) ..
    please tell me how and where to use it..How? -- See the IO Tutorials on Sun for the FileReader (and I assume you know how to call setText and append in the JTextArea).
    Where? -- In the actionPerformed method (better would be a separate thread that is triggered through the actionPerformed method, but that is probably beyond you at the moment), of course.
    Give it a try.

  • How to get the content of a SOAP Message !

    Hi,
    i have a SOAP message wich has inside some information in xml format; how can i get the xml from the message ?
    Cheers.
    Stefano

    use java.xml.soap.
    Then the following:
    SOAPPart sp = soapMessage.getSOAPPart();
    SOAPEnvelope se = sp.getEnvelope();
    SOAPBody  sb = se.getBody();And voila, sb holds your XML document :)
    good luck!

  • How to get the contents of jar file?

    Hi
    is there any way we can see the contents of jar file.(Since it is similar to zip file can we unzip it and see the contents)

    You can use:
    this->getClass().getResourceAsStream("/something.txt")
    where 'something.txt' is a file inside your .jar

Maybe you are looking for

  • The action cannot be completed, the connection to microsoft exchange is unavilable

    Hi, i was installed exchange 2013, when i am accessing a mail box over owa its working fine when i tried to connect though outlook 2013 getting error message action cannot be completed, The connection to the Microsoft exchange server is unavailable,

  • Not be able to change my password AD 2008

    I have a very urgent request to solve this issue. I can not be able to chnage password and my mac is joined AD Domain 2008 STD R2. I got this Error: The password for the account "xxxxxx" was not changed. Your system administrator may not allow you to

  • Cash Manasgement logistics

    Hi  SAP expert/ Venkat I am working on cash mangement and liquidity forecast. Integration of MM covers PO , PR and scheduling agreement. I would like to know whether it is possible to separately show Goods received but not yet invoiced as separate it

  • Solaris 10 (6/06) and default sendmail configuration

    Hello, I don't know whether this is a configuration problem or am I missing something. Situtation: local user tries to send mail but sending is not successful to the remote smart host. Mail is stored to /var/spool/clientmqueue with chmod 660 as defin

  • Full screen incoming caller

    Why Apple removed full screen incoming call photo. It was an awesome feature. I hope Apple will consider this and return in next version of iOS. Everyone has got their own happines to see loved ones photo, which makes them happy, relaxed and lot more