Traverse the children of an given element

Give the element, I want to traverse the children of the element
<?xml version = "1.0"?>
<persons>
<person>
     <name>Joe</name>
     <age>22</age>
     <dept>HR</dept>
</person>
</persons>
Caller: traverseElementChildren("person");
Here's my attempt, but it yield null pointer exception on node.getNodeValue();
public static void traverseElementChildren(String nodeName)
     NodeList rootNode = doc.getElementsByTagName(nodeName);
     Element elem = (Element)rootNode.item(0);
     NodeList n = elem.getChildNodes();
     for (int i=0; i<n.getLength(); i++)
     {     Node node = rootNode.item(i);
          //Exception in thread "main" java.lang.NullPointerException
          System.out.println(node.getNodeValue());
}

OK, now I do the following but surprising return
null
null
nullMaybe you should rebuild your JAVA file(s).
And also verify that the parsed xml file is the one you have posted.
With the following xml file:
<?xml version = "1.0"?>
<persons>
<person>
<name>Joe</name>
<age>22</age>
<dept>HR</dept>
</person>
</persons>
The following statement:
        traverseElementChildren("person");With the following method:
    public static void traverseElementChildren(String nodeName)
        NodeList rootNode = doc.getElementsByTagName(nodeName);
        Element elem = (Element)rootNode.item(0);
        NodeList n = elem.getChildNodes();
        for (int i = 0; i < n.getLength(); i++)
            Node node = n.item(i);
            System.out.println(node.getNodeName());
    }Gives the following output at the console:
#text
name
#text
age
#text
dept
#text
So it IS working perfectly well. No starnge behaviour at all.
Next time please paste your code between code tags exactly like this:
&#91;code&#93;
your code
&#91;/code&#93;
Thank you

Similar Messages

  • Scene Graph traversal. Getting all the children of a node recursively

    Hi,
    Requirement: To resize all the controls of a scene (including controls that contain text like label, button) as per the scene size
    Approach: To implement the above requirement (see code snippet below), I added Listeners for width and height properties of a Scene and whenever the scene size changes, I get all the children of the root node of the scene and invoked the setScaleX() and setScaleY() for the children.
    Problem: In my design, labels and buttons are wrapped inside VBox, HBox etc. Method getChildrenUnmodifiable() returns only the first level of children and hence my HBox and VBox are getting scaled as per the scene size but not the children of VBox and HBox. Is there a built-in function to get all the children of a node recursively ? Or what is the best way to resize text as the scene size changes ?
    Scene mainScene = new Scene(borderPane, PERMANENT_WIDTH,
                    PERMANENT_HEIGHT, Color.HONEYDEW);
    rootNode = mainScene.getRoot();
            mainScene.widthProperty().addListener(new ChangeListener() {
                @Override
                public void changed(ObservableValue observable, Object oldValue,
                        Object newValue) {
                    Double widthScalingFactor = ((Double) newValue) / PERMANENT_WIDTH;
                     ObservableList<Node> children = rootNode.getChildrenUnmodifiable();
                    for (Node child : children) {
                        child.setScaleX(widthScalingFactor);
            mainScene.heightProperty().addListener(new ChangeListener() {
                @Override
                public void changed(ObservableValue observable, Object oldValue,
                        Object newValue) {
                    Double heightScalingFactor = ((Double) newValue) / PERMANENT_HEIGHT;
                    ObservableList<Node> children = rootNode.getChildrenUnmodifiable();
                    for (Node child : children) {
                        child.setScaleY(heightScalingFactor);
            });Thanks.

    Added the following code to get all the children recursively. now the scaling is applied to all nodes of a scene.
        private static void getChildren(Parent parentNode) {
            if (parentNode.getChildrenUnmodifiable().size() != 0) {
                ObservableList<Node> tempChildren = parentNode
                        .getChildrenUnmodifiable();
                allChildren.addAll(tempChildren);
                for (Node n : tempChildren)
                    getChildren((Parent) n);
            } else
                allChildren.add(parentNode);
        }

  • I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0.  Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file ext

    I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0. so I can reburn the films on a single BluRay disc. Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file extensions on the VOB files to MPEG but this was no help. Some of the VOB files contain numerous film clips but my software does not appear to be able to recognize them as such. I need to know if replacing my old Premier Elements with the new Version 13 would solve this problem or not. Any advice would be greatly appreciated!
    Bob

    Bob
    What do you have now.....
    What computer operating system do you have?
    We can go into the finer points of source and your intentions, but for now it would appear that you are using SD 4:3 source media to get to a HD 16:9 result. Lots to discuss in this regard.
    What was given to you on the DVD disc? DVD-VIDEO 4:3 or something else?
    If DVD-VIDEO on DVD disc, you should expect to find on the disc a folder named VIDEO_TS. That is your target for your video files.
    If you were given a DVD-VIDEO on DVD disc, then all you want from it are the video files, specifically
    VTS_01_1.VOB, VTS_01_2.VOB, and so on through that series until possibly getting to
    VTS_02_1.VOB, and so on. How many files you have beyond the VTS_01_1.VOB file will depend on the size of the DVD-VIDEO.
    Does the above scenario apply to you?
    The alternative might be someone giving a DVD disc (data disc) which contains just the VTS files mentioned which were copied from
    the VIDEO_TS Folder. So, you do not get the whole VIDEO_TS Folder, just the essential video files. Does this scenario apply to you.
    I see no need to replace your Premiere Elements 4 with a later version unless you have a huge project and need a later version that will be a 64 bit application running specifically on Windows 7, 8, or 8.1 64 bit computer.
    Consider...Premiere Elements 4 and if you have DVD-VIDEO on DVD....
    1. Place the DVD disc in the burner tray
    2. Open Premiere Elements 4 and set the project preset for NTSC DV Standard (assuming you are working in a NTSC setup)
    3. Go to
    Get Media
    "DVD, Digital Camera, Mobile Phone, Hard Drive Camcorder, Card Reader"
    "Adobe Premiere Elements - Media Downloader" and its Advanced dialog.
    Set the Source in the latter dialog for the drive which has your DVD disc inserted in its tray
    You should see your VTS_01_1.VOB thumbnail in the "Adobe Premiere Elements - Media Downloader" Advanced dialog.
    With this VOB selected, click on Get Media to get the file from there into the project.
    Should work fine.
    Complications may be involved if the people who processed your footage gave you something other what is described above.
    Please review and consider, and then we can plan our project strategy accordingly.
    Thank you.
    ATR

  • How can I update the children after updating a node in a tree?

    Hi everyone.
    I'm trying to update a subtree programatically while using a managed bean as data source.
    All topics I can find are about using VOs and JUCtrlHierNodeBinding.updateValuesFromRows.
    Now I need to find some way to directly update nodes without any Row. What should I do?
    Here's the code:
    tags:
                                    <af:tree id="tframe" initiallyExpanded="true"
                                             selectionListener="#{backingBeanScope.systemDataFrameBB.onSelectNode}" var="n"
                                             binding="#{backingBeanScope.systemDataFrameBB.tframe}"
                                             value="#{systemDataFrameMB.treeData}" expandAllEnabled="true"
                                             rowSelection="single" fetchSize="-1" contentDelivery="immediate"
                                             immediate="true" summary="summary">
                                        <f:facet name="nodeStamp">
                                                      <af:group>
                                                      <af:outputText value="#{n.is_system?'[SYSTEM]':''}" />
                                                      <af:outputText value="#{n.is_use?'':'[X]'}" />
                                                                     <af:outputText value="#{n.data_frame_name}"/>
                                                      </af:group>
                                        </f:facet>
                                    </af:tree>
    managed bean(systemDataFrameMB):
         private ChildPropertyTreeModel treeData;
         public ChildPropertyTreeModel getTreeData() throws SQLException
              if (this.treeData == null)
                   AuthAMImpl authAM = this.getAppModule();
                   List<DataFrameNode> subTrees = authAM.getDataFrameTrees();    // load with JDBC and POJO
                   DataFrameNode root = new DataFrameNode();      // insert all sub-trees into a new tree
                   root.setData_frame_id(0);
                   root.setData_frame_name("[ROOT]");
                   root.setParent_data_frame_id(Integer.MIN_VALUE);
                   root.setIs_system(true);
                   root.setIs_use(true);
                   if (subTrees != null && subTrees.size() > 0)
                        root.setChildren(subTrees);
                        for (DataFrameNode n : subTrees)
                             n.setParent(root);
                   this.treeData = new ChildPropertyTreeModel(root, "children");      // I guess this is the simplest way to show hierachical data...
              return this.treeData;
    model:
    public class DataFrameNode
         private int data_frame_id;
         private String data_frame_name;
         private int parent_data_frame_id;
         private boolean is_use;
         private boolean is_system;
         private DataFrameNode parent;
         private List<DataFrameNode> children;
            // getters/setters are omitted....
    backing bean(systemDataFrameBB):
            // edit event handler
         public void onEditResult(DialogEvent de)
              String name = (String)this.getItName().getValue();
              boolean isUse = this.getSbcIsUse().isSelected();
              SystemDataFrameMB dfMB = (SystemDataFrameMB)JSFUtils.resolveExpression("#{systemDataFrameMB}");
              try
                   node.setData_frame_name(name);
                   node.setIs_use(isUse);
                   dfMB.updateNode(node);                   // persist changes, this method will change all the children's 'is_use' field to FALSE when isUse == FALSE
                   AdfFacesContext.getCurrentInstance().addPartialTarget(this.getTframe());      // refresh the tree, only the edited node will be updated, but I want the tree to update the whole sub-tree to reflect the change on all its children
              catch (Exception e)
                            // omitted...
            }

    I solved the problem using RichTree.visitChildren :)
    Maybe not the proper way, but at least it works...
                                    <af:tree id="tframe" initiallyExpanded="true"
                                             selectionListener="#{backingBeanScope.systemDataFrameBB.onSelectNode}" var="n"
                                             binding="#{backingBeanScope.systemDataFrameBB.tframe}"
                                             value="#{systemDataFrameMB.treeData}" expandAllEnabled="true" rendered="true"
                                             rowSelection="single" fetchSize="-1" contentDelivery="immediate"
                                             immediate="true" clientComponent="true" summary="summary">
                                        <f:facet name="nodeStamp">
                                            <af:panelGroupLayout id="tg">
                                                <af:clientAttribute name="node_path" value="#{n.node_path}"/>
                                                <af:outputText id="tIsSystem" value="#{n.is_system?'[SYSTEM]':''}"/>
                                                <af:outputText id="tIsUse" value="#{n.is_use?'':'[X]'}"/>
                                                <af:outputText value="(#{n.data_frame_id})#{n.data_frame_name}"/>
                                            </af:panelGroupLayout>
                                        </f:facet>
                                    </af:tree>
    private static final String PARENT_NODE_PATH = "PARENT_NODE_PATH";
    // all nodes should have a 'node_path' property whose value looks like 'id1/id2/id3'
    // keep path on view root
    FacesContext.getCurrentInstance().getViewRoot().getAttributes().put(PARENT_NODE_PATH, node.getNode_path());
    // visit the whole tree to find specified nodes
    VisitContext vc = VisitContext.createVisitContext(FacesContext.getCurrentInstance());
    RichTree.visitChildren(vc, this.getTframe(), new VisitCallback()
              @Override
              public VisitResult visit(VisitContext visitContext, UIComponent uIComponent)
                   if (uIComponent instanceof RichPanelGroupLayout &&
                        visitContext.getFacesContext().getCurrentPhaseId().equals(PhaseId.INVOKE_APPLICATION))
                        String parentPath = (String)visitContext.getFacesContext().getViewRoot().getAttributes().get(PARENT_NODE_PATH);
                        if (parentPath != null & parentPath.length() > 0)
                             // if current node is in the sub-tree then update its state
                             String path = (String)uIComponent.getAttributes().get("node_path");
                             if (path != null && path.length() > parentPath.length() && path.charAt(parentPath.length()) == '/')
                                  RichOutputText t = (RichOutputText)uIComponent.findComponent("tIsUse");
                                  JSFUtils.refreshTarget(t);
                   return VisitResult.ACCEPT;
         });there might be another solution which uses JavaScript:
    I found out that the HTML tag ADF generated has a attribute like "id='0_1_2_3'", that means I can find the sub-tree with JavaScript.
    But it was not tested 'cause I don't think it would be stable.
    it looks like this:
    StringBuffer clientId = new StringBuffer(node.getLevel_id() * 4);
    while (node != null)
         clientId.insert(0, node.getData_frame_id());
         clientId.insert(0, '_');
         node = node.getParent();
    JSFUtils.executeScript("disableSubTree('" + (clientId.length() > 0 ? clientId.substring(1) : clientId.toString()) +"')");
                <af:resource type="javascript">
                  function disableSubTree(id)
                      // find the adfrichtree component and traverse it, trying to find the sub-tree and modify the nodes
                </af:resource>

  • How to extract the nodes of any given XML document ???

    Hello,
    Greetings! It is an interesting forum.
    A Snippet of XML Schema PurchaseOrder.xsd as given in user guide is as follows
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="PurchaseOrder" type="PurchaseOrderType"
    xdb:defaultTable="PURCHASEORDER"/>
    <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T">
    <xs:sequence>
    <xs:element name="Reference" type="ReferenceType" minOccurs="1"
    xdb:SQLName="REFERENCE"/>
    <xs:element name="Actions" type="ActionsType" xdb:SQLName="ACTIONS"/>
    <xs:element name="Reject" type="RejectionType" minOccurs="0"
    xdb:SQLName="REJECTION"/>
    <xs:element name="Requestor" type="RequestorType"
    xdb:SQLName="REQUESTOR"/>
    <xs:element name="User" type="UserType" minOccurs="1"
    xdb:SQLName="USERID"/>
    <xs:element name="CostCenter" type="CostCenterType"
    xdb:SQLName="COST_CENTER"/>
    <xs:element name="ShippingInstructions" type="ShippingInstructionsType"
    xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
    <xs:element name="SpecialInstructions" type="SpecialInstructionsType"
    xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
    <xs:element name="LineItems" type="LineItemsType"
    xdb:SQLName="LINEITEMS"/>
    </xs:sequence>
    </xs:complexType>
    full schema is available in url
    http://download-west.oracle.com/docs/cd/B12037_01/appdev.101/b10790/xdb03usg.htm#BABBGIED
    The views use XPath expressions and functions such as extractValue() to define the mapping between columns in the view and nodes in the XML document. The following view is created on purchase order schema.
    Creating Relational Views On XML Content
    CREATE OR REPLACE view PURCHASEORDER_MASTER_VIEW
    (REFERENCE, REQUESTOR, USERID, COSTCENTER,
    SHIP_TO_NAME,SHIP_TO_ADDRESS, SHIP_TO_PHONE,
    INSTRUCTIONS)
    AS
    SELECT extractValue(value(p),'/PurchaseOrder/Reference'),
    extractValue(value(p),'/PurchaseOrder/Requestor'),
    extractValue(value(p),'/PurchaseOrder/User'),
    extractValue(value(p),'/PurchaseOrder/CostCenter'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/name'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/address'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/telephone'),
    extractValue(value(p),'/PurchaseOrder/SpecialInstructions')
    FROM PURCHASEORDER p;
    When we register XML Schema in Oracle 9i, the schema elements of XML documents are stored as XMLType, that is, stored using object-relational storage techniques.
    For a small schema, we could build the above view manually, but for large/nested schema, if we have query to build XML documents node list, it will help us to build Relational Views on XML Content.
    How do we extract the nodes of any given XML document through O-R structures or XML DB using XML DB functions?
    Any alternate thoughts are welcome.
    I appreciate your help.
    Regards
    Ram

    Ram
    Once again, I do not think that you can solve the problem you are trying to solve. Fundamentally you need to determine for a given element of a given complex type what are it's child elements. For each of those elements you then need to find out whether or not it in turn has child elements...
    Then you have to think about elements defined as ref rather than type, elements that are substituteable, and the rest of possibilities that can be described with XML Schema.
    If you can solve that problem you're a better man than I as the saying goes. Anyone rather than give you a fish, I'll show you how to at least put a worm on the hook..
    The following query gets the names of the elements inside a each of the global complex types
    Good luck, if you come up with a query to do this I'd love to see it...
    SQL> column COMPLEX_TYPE format A32
    SQL> column ELEMENT format A32
    SQL> --
    SQL> select extractvalue
    2 (
    3 value(ct),
    4 '/xs:complexType/@name',
    5 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    6 ) COMPLEX_TYPE,
    7 extractvalue
    8 (
    9 value(et),
    10 '/xs:element/@name',
    11 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    12 ) ELEMENT
    13 from resource_view,
    14 table
    15 (
    16 xmlsequence
    17 (
    18 extract
    19 (
    20 res,
    21 '/r:Resource/r:Contents/xs:schema/xs:complexType',
    22 'xmlns:r="http://xmlns.oracle.com/xdb/XDBResource.xsd"
    23 xmlns:xs="http://www.w3.org/2001/XMLSchema"')
    24 )
    25 ) ct,
    26 table
    27 (
    28 xmlsequence
    29 (
    30 extract
    31 (
    32 value(ct),
    33 '/xs:complexType/*/xs:element',
    34 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    35 )
    36 )
    37 ) et
    38 where equals_path(res,'/home/SCOTT/poSource/xsd/purchaseOrder.xsd') = 1
    39 /
    COMPLEX_TYPE ELEMENT
    -------------------------------- ------------------------PurchaseOrderType Reference
    PurchaseOrderType Actions
    PurchaseOrderType Reject
    PurchaseOrderType Requestor
    PurchaseOrderType User
    PurchaseOrderType CostCenter
    PurchaseOrderType ShippingInstructions
    PurchaseOrderType SpecialInstructions
    PurchaseOrderType LineItems
    LineItemsType LineItem
    LineItemType Description
    LineItemType Part
    ActionsType Action
    RejectionType User
    RejectionType Date
    RejectionType Comments
    ShippingInstructionsType name
    ShippingInstructionsType address
    ShippingInstructionsType telephone
    19 rows selected.

  • How to Find Number of Given Element in a XML Document

    Hello Experts,
    I want to know the number of given element in a XML document. For example if we have an employees information as a XML document, can we have how many <phone> element in the XML document?
    Thanks in advance.
    Regards,
    JP

    Hello,
    Once you've answered all the above.
    If you can run xpath that supports functions against the xml, the expression:
    count(//phone)Otherwise, without leaving SQL:
    select count(*) from
    xmltable('//phone' passing
      -- Your XML goes here, could be a table column with type XMLTYPE.
      xmltype('<person><phone>123-456-7890</phone><phone>098-765-4321</phone></person>')
      columns phone varchar2(24 char) path '/phone'
    ;

  • Traversing the Java Jar file

    Hi,
    This might sound like a weird question, but I need to traverse the Java Jar file and create respective Java objects into objects in some other language using reflection.
    Is it possible to find the path for the class files located in any jar file? Does Java supports traversing or reading and finding jar contents?
    Thanks

    I found a way to traverse the Jar, using java.util.zip, one can create a zip file for the given jar file and using ZipEntry it is possible to findout the properties associated with the jar/zip entries.

  • (function ($) { // Checks if a given element resides in default extra leaving container page. function isInExtraLeavingContainer(element) { return $(element)

    [email protected] my xbox 360 (function ($) { // Checks if a given element resides in default extra leaving container page. function isInExtraLeavingContainer(element) { return $(element)

    I suspect it has something to do with the java but not sure
    Just so you'll know, there is no Java on that page.  There is, however JavaScript.  You should know that those two things are different as night and day.
    To fix your problem, change this -
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
      </script>
    </head>
    to this -
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    -->
      </script>
    </head>

  • E-mailed File "The project is not compatible with the current version of Premiere Elements"

    I have Version 12 on a PC.
    My friend has Version 12 on a MAC.
    E-mailed him a file.
    He could not open, and a message box popped up:   "The project is not compatible with the current version of Premiere Elements".
    Could someone kindly asssit, this does not make sense as to why it is not opening, since both computers are using the same version.
    Thank you,
    Ben
    [email protected]

    Ben
    As said, you cannot open a Premiere Elements 12 Windows project file (named project.prel) in Premiere Elements 12 Mac. And vice versa.
    Details
    Given that your source is imported into a Premiere Elements 12 Windows project and placed on its Timeline for edit. That Timeline content cannot get out of the program without export. Export choices are found in the Publish+Share section of the program.
    In your case, you want to take the Timeline content of Premiere Elements 12 Windows and export it to a format with which Premiere Elements 12 Mac supports (look at .mov or .mp4). In this regard, in Premiere Elements 12 Windows look at Publish+Share/Computer/AVCHD and one of its .mp4 presets or Publish+Share/Computer/QuickTime and one of its .mov presets (suggested H.264 video codec).
    Those exports will be saved to the computer hard drive of the Windows computer. Then email the .mov or .mp4 file (beforehand, check the
    email carrier's specification for that). Depending on the circumstances, you could transfer the file to a USB Flash Drive for the sharing.
    Remember, sharing the .mov and .mp4 involves "whole" video. Depending on the edits, the video may need to be cut by the receipent. You are not dealing with the project file. The story would be different if this sharing and editing is done from Premiere Elements Windows to Premiere Elements Windows. And, if that were the case, then you would have to assure that the source media of the project traveled with the project file. (See Project Archiver feature of the program.)
    That is a rough sketch of the situation. I can fine tune the details further if necessary.
    Please review and consider.
    Thanks.
    ATR

  • Nstalling Photoshop Elements 13 and Premiere Elements 13 but I have no disc drive. Is it possible to install and register it online?, I bought at Media Market the CD for installing Photoshop Elements 13 and Premiere Elements 13 but I have no disc drive. I

    I bought at Media Market the CD for installing Photoshop Elements 13 and Premiere Elements 13 but I have no disc drive. Is it possible to install and register it online?

    I was in the same boat as you, so I went to Best Buy and purchased the box (on sale, by the way). I then downloaded the trials separately for Photoshop Elements and Premiere Elements from the Adobe product site.
    In the box you should have been given 2 discs (one for Photoshop Elements (PS) and one for Premiere Elements (PE)) and something called a "redemption code" on a square of colorful cardboard with instructions on how to get your serial keys for installation. The single redemption code is NOT the serial/product key you use to install your purchase. Once you follow the instructions on this card you will be shown two serial/product codes, one each for PE and PS. Write them down, print them, whatever, you will need them during installation.
    Now go to the downloaded trial file(s) and run the installer, either for PE first or PS, it makes no difference. During the installation you will be asked if you want to start a trial or use a serial/product code. Choose "I have a code". Enter the product key and you will be golden. Repeat for the other program.
    Hope this helps!

  • Traversing the context

    Hi,
    Looking for some information on traversing the view context.
    Using a different version of the same example in one of my previous posts
    NodeA
    NodeA1
    ********attribute1
    ********NodeA11
    *************attribute2
    The context structure described above is created at design time. I create and populate node elements from NodeA, at runtime.
    Need code to access value of 'attribute1', and the value of selected element of NodeA11. NodeA11 can have multiple attributes, that is added at runtime.
    Example of context at runtime is as follows
    CommonFields
    Field (node element)
    *******name (attribute)
    *******ValueSet (node element)
    3A (attribute)
    3B (..)
    3C (..)
    If you get any headache solving this question, I apoligise upfront.
    Thanks !

    Hi Srikanth
    Check this post on the context serializer
    Re: converting context-tree to xml?
    You can conditionalize some aspects of this code like checking for the attribute name against a defined string to derive the value for that particular attribute
    Regards
    Pran

  • Traversing the ParseTree

    The 'getParseTree()' method of ElementDecl returns the ROOT of the ParseTree, of type XMLNode.
    How can I traverse the entire tree?
    bcos this method is a part of ElementDecl and u cannot type cast XMLNode to ElementDecl (bcos ElementDecl extends XMLNode and making a new object will erase the old info about the Parse tree)
    I am doing all this to detect the presence of an ASTERISK, PLUS for an ELEMENT!!!!
    Can you please ask the implementors of the XML Java Parser about this issue?

    Hi Srikanth
    Check this post on the context serializer
    Re: converting context-tree to xml?
    You can conditionalize some aspects of this code like checking for the attribute name against a defined string to derive the value for that particular attribute
    Regards
    Pran

  • List all the directories on a given url on remote server

    Could any body help me in Listing the files on a given URL directory on a remote server using Java.
    I have done this:
    File dir = new File("http://www.abc.com/web/data/sos/zip/tm/");
    String[] children = dir.list();
    if (children == null) {
    out.println("CANNOT FIND ANY FILE");    // IT IS ALWAYS GOING IN THIS CONDITION AND FAILING THEREFORE.
    // Either dir does not exist or is not a directory
    } else {
    for (int i=0; i<children.length; i++) {
    // Get filename of file or directory
    String filename = children;
    out.println("HI");

    kus wrote:
    There is a solution but not a very portable one, i.e. you can't use it to get a listing of files from any server that you happen to look at. But here are the steps you need to take:
    1. Use a browser (firefox, opera, etc.) to view the file listing and then view the source.
    2. Duplicate the retrieval of data from the given URL in Java (new URL(...), etc.)
    3. Parse the HTTP response and/or the HTML that the server returns to you to extract what you need.
    Step #3 is the biggest piece of work and the format you need to parse will depend on whatever the remote server hands to you. It's intended for humans, not machines; every server can decide how to format this and it even depends on the server's configuration how this data is presented to you. In any case, it's entirely up to you to make sense of whatever the server happens to throw back at you and if the server happens to present you a nice, picturesque page rather than a listing of files then your completely out of luck.He actually wasn't talking about http at all, so most of this thread has been a wild goose chase.

  • Where is the download link for premiere elements 10 and previous versions?

    Where is the download link for premiere elements 10 and previous versions?
    Also the search program doesn't find previous version downloads.
    Chat is completely busy and won't let me in.
    And I am not paying $39 for what is an Adobe issue.
    FAIL!
    Anyone know where I might find it?

    A.T. Romano wrote:
    ProDesignTools offers these downloads for the Adobe tryouts of older Photoshop Elements and Premiere Elements versions
    What I've always found strange though is that the downloads themselves come from Adobe's servers. Just seems weird that Adobe themselves won't provide the links!
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • I have elements 11 and I did the 30 day trial of elements 12. When the trial expired it caused problems with my elements 11. Nothing opens correctly, some not at all and I can't get help?

    Please help me. I am so disappointed in Adobe. I was planning on upgrading to 12 after the trial period but was unsure still. The problem I am having now is that my PSE 11 Organizer is off the grid. When I right click on a file and go to "open With", it only offers me the option to use Premiere Elements and not Photoshop. I found the .exe@ file for Photoshop Elements 11 and created a shortcut to my task bar in order to get to it. That won't work on my organizer though. Should I just uninstall and reinstall the whole thing? I'm on Windows 8.1. I refuse to upgrade to 12 after being refused any support considering it was the trial they encouraged me to try that caused my problem.If I have to reinstall everything with it impact the projects I've created?

    wesb
    What computer operating system is involved in the Premiere Elements 11 and 13 issues? Same computer or different ones? Are you installing from purchased download installation files or from purchased installation disc? Does Premiere Elements 11 work completely on this computer whereas 13 will not?
    Let us go through the typical drill so as to take nothing for granted.
    1. Does the problem exist with or without the antivirus and firewall(s) disabled? Are you working with an individual home computer or in a
    school or company network?
    2. Are you running the program as Administrator and is there any "domain" account involved?
    3. Is your video card/graphics card up to date according to the web site of the manufacturer of the card?
    4. Do you have the latest version of QuickTime installed on the computer with Premiere Elements?
    Let us start by ruling in or out any of the above, and then we can decide what next.
    Any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

Maybe you are looking for

  • Bugs in HFM 11.1.2.2.300 ?

    Dear experts, I want to know if my issue below is caused by bug in HFM v11.1.2.2.300: FYI, I'm using EPMA and my HFM is shared with Dimension Library 1. After running a consolidation, my elimination journal is created as I wanted. Clicking on Manage

  • Safari doesn't save passwords for webpages like Facebook, Youtube, Twitter etc.

    Hi I have Mountain Line with Safari 6.0.2. I used to open Facebook, Youtube, Twitter etc. and everytime I select "Stay signed in" "Remember my password" etc. but it doesn't save my passwords and everytime I have to sign in again. I never sign out fro

  • How do I get a list of directories and sub-directories?

    Hi All, I'm new to Java and have a couple of questions that are really stumping me and I sure could use some help. Question 1: I have this class file that I want to return back me a list of directories and only directories, not files. I can't figure

  • Connecting mysql-4.1.12a-win32 with jakarta-tomcat-3.3.2 using mysql-connec

    hi calverstine here, i have been trying to connect tomcat to mysql using mysql-connector-java-3.1.10, but does not have any clue how to do it, if you guys ask me to refer to : http://dev.mysql.com/doc/connector/j/en/cj-classpath.html it only told me

  • Problem with dv7 laptop

    When I turn my computer on, it starts a "file system on C" I haven't turned on my laptop in over a week and a half. After a "System Recovery" it goes straight to the disk check Also states: "system volume on disk is corrupt" dv7 3165dx WA794UAR #ABA