Validate document starting at xpath

Hi, I have an issue where I am trying to validate an xml document, but there is header information that I don't want it to validate. So I want to be able to tell it to start validating at a certain xpath location.
xpathExpression contains the xpath link, but it seems to ignore it.
try {
              DOMSource domSource = new DOMSource(doc, xpathExpression);
                StringWriter writer = new StringWriter();
                StreamResult result = new StreamResult(writer);
                TransformerFactory tf = TransformerFactory.newInstance();
                Transformer transformer = tf.newTransformer();
                transformer.transform(domSource, result);
                String docString = writer.toString();
              SAXBuilder builder =
                new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
                      builder.setValidation(true);
              builder.setFeature(
                "http://apache.org/xml/features/validation/schema",
                true);
              builder.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
            builder.setProperty(
                      "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
                         new File(validationPath).toURI().toString());
            org.jdom.Document docx = builder.build(new StringReader(docString));
            this.wrong(rowCount,1, docString);
            catch (Exception ex){
                 this.wrong(rowCount, 2, ex.getMessage());
                 error = true;
            }I also am having a hard way figuring out how to make sure the document is validated properly.
Edited by: sarcasteak on Apr 15, 2009 10:26 AM

>
Then you should work on getting a document validated first, before trying more complicated things like your question. Don't attempt two things at once unless you're sure that at least one of the things isn't going to be problematic. Otherwise you won't know which of the things is a problem.
I am pretty sure it is validated, as I am using error checking and nothing is coming back negative, but is there a way to check to see if the validation was a success?

Similar Messages

  • Pages for Ipad freezes when I try to delete a document. Documents start to flash on and off. Can't turn app off or even turn Ipad off.

    Pages for Ipad freezes when I try to delete a document. Documents start to flash on and off. Can't turn app off, or turn Ipad off.

    FWIW, think I found a solution to this problem elsewhere on this forum. Go to Settings / General / Accessibility on your iPad. Check to see if you have enabled "Bold Text" and if so turn that off. The iPad now restarts. In my case (and others) things are now back to normal with iWorks file management functions.
    I can now rename files, delete them, and do other file management tasks in all iWorks apps on iPad without the apps freezing or freezing the iPad. Would like to give credit to the user who posted that but can't find it at the moment - he claimed that an Apple Tech suggested the fix when he called about it, so they know about it and hopefully will get fixed eventually.

  • B2B Document Definition - Using xpath 'or' in Identification Value

    Hello,
    I have a requirement similar to the one below, this is an example from the Oracle documentation,
    In the below example, Oracle B2B compares the value of the country attribute to the value set for Identification Value. If the values match, then the document is identified successfully.  I have a scenario, where I will receive data with value in the country attribute to be "US" or "France" or "India". Can an 'or' be used in the identification value? such as US or France or India as the Identification values for the Identification Expression "//*/@country".
    Any ideas / suggestions are greatly appreciated.
    Option 3: Check the Value of an Attribute
    Assume that the value of the country attribute is US. Set the parameters as follows:
    Field
    Value
    Identification Value
    US
    Identification Expression
    //*/@country
    Here is the excerpt of the XML payload for this option.
    Check the Value of an Attribute
    <?xml version="1.0" encoding="windows-1252" ?>
    <MyAddress country="US" xmlns="http://www.example.org"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="PO.xsd">
      <name>B2B Buyer</name>
      <street>100 Oracle Parkway</street>
      <city>Redwood City</city>
      <state>CA</state>
      <zip>94065</zip>
    </MyAddress>
    Thanks,
    Venkatesh

    Hi,
    I am interested to know if you managed to make any progress on this issue?
    We have a similar requirement whereby a trading partner sends an ebMS request using a single document type with the ebMS ACTION header identifying the action the request relates to. For example, the following are the key fields from two requests:
    1)
      SENDER_NAME = TradingPartnerX
      RECEIVER_NAME = OurCompanyName
      SERVICE_NAME = Manage Work
      SERVICE_TYPE = v1.0
      BUSINESS_ACTION_NAME = assignWork
      Payload = <ManageWorkRequest>...</ManageWorkRequest>
    2)
      SENDER_NAME = TradingPartnerX
      RECEIVER_NAME = OurCompanyName
      SERVICE_NAME = Manage Work
      SERVICE_TYPE = v1.0
      BUSINESS_ACTION_NAME = updateWork
      Payload = <ManageWorkRequest>...</ManageWorkRequest>
    Where the Payloads of the two requests could potentially be identical.
    Currently, we have the following configuration:
    - Custom xml document type for ManageWorkRequest:
      - Action name: (blank)
      - Service name: (blank)
      - Service type: (blank)
      - From Role: (blank)
      - To Role: (blank)
      - Validate ebMS Header: unchecked
    - Custom xml document definition for ManageWorkRequest:
      - XML Identification Expression (XPath): //*[local-name() = 'ManageWorkRequest']
      - XML Identification Value: (blank)
    - TradingPartnerX Documents:
      - Definition added for ManageWorkRequest
        - both 'Sender' and 'Receiver' checked
      - Document Details:
        - Override DocType Param: checked
        - Document Type ebMS:
          - Action name: (blank)
          - Service name: Manage Work
          - Service type: v1.0
          - From Role: Buyer
          - To Role: Supplier
          - Validate ebMS Header: unchecked
    - Agreement setup between OurCompanyName and TradingPartnerX for inbound communication from TradingPartnerX to OurCompanyName
    When TradingPartnerX attempts to send an assignWork ManageWorkRequest, B2B fails to identify which document type and agreement it relates to. After increasing the B2B logging level, the following can be seen in the soa_server1-diagnostic.log file:
    [2013-11-19T11:16:39.881+10:00] [soa_server1] [TRACE] [] [oracle.soa.b2b.repository] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: <anonymous>] [ecid: ccce6c0f16adb222:111ddc50:142539e3958:-7ffd-000000000013a96f,0] [APP: soa-infra] [SRC_CLASS: oracle.tip.b2b.log.ToplinkLogger] [SRC_METHOD: log] 2013.11.19 11:16:39.880--ServerSession(606155273)--Connection(692532584)--Thread(Thread[Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms[[
    ,10,Application Daemon Threads])--SELECT ID, DIRECTION, APPS_DOCTYPE_NAME, DOC_DEF_NAME, APPS_DOC_PROTOCOL_VERSION, DOC_DEF_TIMESTAMP, APPS_DOCUMENT, DOC_PROTOCOL_NAME, APPS_XSLTFILE, DOC_PROTOCOL_VERSION, ATTRIBUTE1, DOC_REF_NAME, ATTRIBUTE3, DOC_ROUTING_ID, ATTRIBUTE5, DOCTYPE_NAME, ATTRIBUTE7, FROM_DC, ATTRIBUTE9, BUSINESS_ACTION_NAME, LABEL, CREATED, LABEL_DESC, APPS_DOC_PROTOCOL_NAME, MODIFIED, APPS_ACTION, RECEIVER_NAME, ATTRIBUTE2, SENDER_NAME, ATTRIBUTE6, SERVICE_NAME, ATTRIBUTE10, SERVICE_TYPE, DEFINITION_MO, STATE, AGREEMENT_ID, TO_DC, ATTRIBUTE8, TPA_NAME, IS_CUSTOM, TPA_REFERENCE, ATTRIBUTE4, CREATED_BY_UI, USER_NAME, CONTROL_NUMBER_SET FROM B2B_LIFECYCLE WHERE ((SENDER_NAME = ?) AND ((RECEIVER_NAME = ?) AND ((BUSINESS_ACTION_NAME = ?) AND ((SERVICE_NAME = ?) AND ((SERVICE_TYPE = ?) AND ((DIRECTION = ?) AND (STATE = ?)))))))
            bind => [TradingPartnerX, OurCompanyName, assignWork, Manage Work, v1.0, INBOUND, Active]
    [2013-11-19T11:16:39.883+10:00] [soa_server1] [ERROR] [] [oracle.soa.b2b.engine] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: <anonymous>] [ecid: ccce6c0f16adb222:111ddc50:142539e3958:-7ffd-000000000013a96f,0] [APP: soa-infra] Error -:  B2B-50547:  Agreement not found for trading partners: FromTP TradingPartnerX, ToTP OurCompanyName with document type ACTION:assignWork Service:Manage Work ServiceTypev1.0-INBOUND.[[
            at oracle.tip.b2b.tpa.RepoDataAccessor.queryAgreementMO(RepoDataAccessor.java:866)
            at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:415)
            at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:465)
            at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:243)
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2560)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1751)
            at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4258)
            at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3856)
            at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3309)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:637)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Error -:  B2B-50547:  Agreement not found for trading partners: FromTP TradingPartnerX, ToTP OurCompanyName with document type ACTION:assignWork Service:Manage Work ServiceTypev1.0-INBOUND.
            at oracle.tip.b2b.tpa.RepoDataAccessor.queryAgreementMO(RepoDataAccessor.java:866)
            at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:415)
            at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:465)
            at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:243)
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2560)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1751)
            at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4258)
            at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3856)
            at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3309)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:637)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Looking at the SQL which has been logged, B2B is looking for an agreement which has the following:
      SENDER_NAME = 'TradingPartnerX'
      RECEIVER_NAME = 'OurCompanyName'
      BUSINESS_ACTION_NAME = 'assignWork'
      SERVICE_NAME = 'Manage Work'
      SERVICE_TYPE = 'v1.0'
      DIRECTION = 'INBOUND'
      STATE = 'Active'
    and it fails to identify any matching agreements which is correct - there aren't any matching these constraints. However, if we specify the 'Action name' field in the DocType param overrides for TradingPartnerX, then B2B is able to identify the agreement and everything works.
    Based on this behaviour, it seems that in this scenario, B2B requires a separate agreement for each possible value which can be passed as the BUSINESS_ACTION_NAME in order to identify the document type and agreement correctly. My question is - is there another way to configure B2B to allow a list of valid 'Action names' rather than having to create a separate agreement for each one with the only difference being the value of the 'Action name' field?
    If anyone is able to provide advice or guidance, it would be much appreciated.
    Thanks
    Kevin

  • How to start learning XPATH and XQUERY

    Hello
    Please I am needing some guide to know if there is a guide that I could follow so that I can handle from the very beginning till the end an XML Document.
    Besides I need to know if with JDeveloper I can edit and update an XML document (data type XMLTYPE column) inside of a table.
    I'll appreciate your help.
    Paola.
    @}--->----->>----------

    You could have a start here http://www.w3schools.com/. also the old XMLDB manuals 9.2, 10.1 had primers on handling xml (appendix section), another source for you could be the w3c organization: http://www.w3.org/.
    AFAIK, JDeveloper doesn't have that functionality yet. AFAIK the latest toad version is able to do this...
    Message was edited by:
    Marco Gralike

  • Changing document start-up page to "last view" when document is reloaded

    My computer is equipped with Windows XP, Adobe Acrobat Standard 7.0, and WinEdt 5.5. When I convert latex to pdf (using WinEdt) the pdf always comes up with the top of the first page. Only when I choose the old view (or last view - I have a German version) with "go to" I see were I was before. On an older computer, however, acrobat immediately redirects me to the part of the document viewed before. Question is how to change the settings so that I can change back and forth between pdf and Latex without always starting from page 1 in the pdf (i.e. how can I have the old view as the basic setting??).

    i am using adobe acrobat 9.3.1. i checked Restore last view settings when reopening document, but choose PDF Texify from winedt, the document still open on page 1. several years ago, some older version, the document always open at the page and zoom of previous view without me setting anything.

  • Validate Document grayed out

    I want to validate my document, but I'm not being given the option to do so. What should I check? I've tried several documents.
    I'm using Dreamweaver CS5 on Mac OSX Snow Leopard. It's a trial version.

    Murray *ACP* wrote:
    Yes.  You don't.  You copy the code and paste it into the W3 validator, or upload the page and browse to it using the W3 validator.
    I can indeed do these and do use this w3 service.  But it requires alternating between browser and dw code to locate and edit/repair errors.
    What is the purpose of Dreamweaver cs5's menu item File > Validate?  I thought it might integrate the w3 validation into DW.   I would think that clicking through dwcs5 menu: File > Validate > As XML  would work as listed below, not produce an error.  DW help states:
    The Validate tags feature (File > Validate) has been deprecated as of Dreamweaver CS5. However, Dreamweaver still validates XML and ColdFusion documents.
    You can set preferences for the Validator, the specific problems that the Validator should check for, and the types of errors that the Validator should report.
    Do one of the following:
    For an XML or XHTML file, select File > Validate > As XML.
    For a ColdFusion file, select File > Validate > ColdFusion.
    The Validation tab of the Results panel displays a “No errors or warnings” message or lists the syntax errors it found.
    Double-click an error message to highlight the error in the document.

  • How can I validate that start date occors on or before end date?

    I am using jDev 11.1.1.6.0
    I have a effectiveStartDate and and an effectiveEndDate and I want to validate that if both dates are specified, that the effectiveEndDate occurs on or after the effectiveStartDate.
    I have added validators in my backing bean as shown below, but there is still a problem
    Consider the following scenario:
    1) set effectiveStartDate to 1/1/2011
    2) set effectiveEndDate to 1/1/2010
    I get the validation, as expected. Now
    3) I change effectiveStartDate to 1/1/2010, but the validation message remains on effectiveEndDate because I did not update the effectiveEndDate.
    Can I remove the faces message somehow?
    Can I re-trigger the validation?
    My .jsff page contains
    <af:inputDate label="#{ZspBusinessRulesAttrBundle['ColAttr.StartDate.RuleFolderEffectiveStartDate.RuleFolderEO.EffectiveStartDate']}"
    id="id1"
    value="#{pageFlowScope.manageRuleFolder.effectiveStartDate}"
    autoSubmit="true" required="false"
    validator="#{pageFlowScope.manageRuleFolder.startDateValidator}"
    partialTriggers="id2">
    <af:convertDateTime pattern="#{applCorePrefs.dateFormatPattern}"/>
    </af:inputDate>
    <af:spacer width="10" height="10" id="s4"/>
    <af:inputDate label="#{ZspBusinessRulesAttrBundle['ColAttr.EndDate.RuleFolderEffectiveEndDate.RuleFolderEO.EffectiveEndDate']}"
    id="id2"
    value="#{pageFlowScope.manageRuleFolder.effectiveEndDate}"
    autoSubmit="true" required="false"
    validator="#{pageFlowScope.manageRuleFolder.endDateValidator}"
    partialTriggers="id1">
    <af:convertDateTime pattern="#{applCorePrefs.dateFormatPattern}"/>
    </af:inputDate>
    My backing bean contains
    public void startDateValidator(FacesContext facesContext,
    UIComponent uIComponent, Object object) {
    Date startDate = (Date)object;
    if (!Utility.validateStartDateAndEndDate(startDate,
    effectiveEndDate)) {
    throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
    Resource.getValidationEndDate(),
    null));
    public void endDateValidator(FacesContext facesContext,
    UIComponent uIComponent, Object object) {
    Date endDate = (Date)object;
    if (!Utility.validateStartDateAndEndDate(effectiveStartDate,
    endDate)) {
    throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
    Resource.getValidationEndDate(),
    null));
    }

    Although not ideal, I have worked around the problem. I'd prefer an approach that would retain the error messages on the component, but here is the best I could come up with. I changed the start and end date validators so that they do not throw a ValidatorException but rather add a faces error message that is not tied to any component. This causes the validation message to appear as a popup when changing the start or end date in such a way as to violate the constraint. Unfortunately, the message disappears when you click the ok button.
    The changes in the backing bean are as follows:
    public void startDateValidator(FacesContext facesContext,
    UIComponent uIComponent, Object object) {
    Date startDate = (Date)object;
    if (!Utility.validateStartDateAndEndDate(startDate,
    effectiveEndDate)) {
    AdfUtility.addFacesErrorMessage(facesContext, Resource.getValidationEndDate(),
    null);
    public void endDateValidator(FacesContext facesContext,
    UIComponent uIComponent, Object object) {
    Date endDate = (Date)object;
    if (!Utility.validateStartDateAndEndDate(effectiveStartDate,
    endDate)) {
    AdfUtility.addFacesErrorMessage(facesContext, Resource.getValidationEndDate(),
    null);
    }

  • Documents starts on Page 2

    I am trying to insert page numbers into the footer of a long document. When I place the cursor inside the footer of the first page, the number 2 is inserted and page numbers progress on from there. Why does Pages think page 1 of my document is page 2? I am definitely on the first page of the document. I'm sure the answer is obvious but I'm just not seeing it. Thanks for any help.

    It would be useful to open the Inspector of Layout.
    I wouldn't be surprised to read that it's set this way :
    Yvan KOENIG (VALLAURIS, France) vendredi 9 juillet 2010 21:07:09

  • XPath Expression in document definition

    I am trying to use "XPath Expression1" for 894 in the document definition under XPath in order to retrieve invoice number so that, it would be used in BAM but I am not getting successful in putting exact XPath expression for invoice number. I am using as below
    /Transaction-894/Segment-G82/Element-861
    Pls suggest is there any wrong in the XPath?
    Regards,
    Suneel Jakka

    Here is the XSD for which I am trying XPath for the "Element-861" under "Segment-G82"..
    Pls suggest me..
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Automatically generated by EDIFECS SpecBuilder (http://www.edifecs.com) -->
    <xsd:schema xmlns="http://www.edifecs.com/xdata/200" targetNamespace="http://www.edifecs.com/xdata/200" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified">
         <xsd:annotation>
              <xsd:appinfo>
                   <FileName>C:\Documents and Settings\jakkasun\Desktop\11g\X12_5010_894.ecs</FileName>
                   <InternalID>{0840BE5F-3518-463D-A128-D73D96D4A5D2}</InternalID>
              </xsd:appinfo>
         </xsd:annotation>
         <xsd:element name="Transaction-894" type="Transaction-894"/>
         <xsd:complexType name="Transaction-894">
              <xsd:annotation>
                   <xsd:documentation>This X12 Transaction Set contains the format and establishes the data contents of the Delivery/Return Base Record Transaction Set (894) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to enable a Direct Store Delivery (DSD) vendor to communicate the details of a DSD delivery and is to be used during the check-in procedure. </xsd:documentation>
                   <xsd:appinfo>
                        <UNMKey>Full|CodeList|-&lt;Parent Node ID&gt;.&lt;Index&gt;|Composite|-&lt;Node ID&gt;|Element|-&lt;Node ID&gt;|Loop|-&lt;Node ID&gt;|Segment|-&lt;Node ID&gt;|Transaction|-&lt;Node ID&gt;|ReplacementCharacter|_|InternalSeparator|-</UNMKey>
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Internal-Properties" type="Internal-Properties" minOccurs="0"/>
                   <xsd:element name="Segment-ST" type="Segment-ST"/>
                   <xsd:element name="Segment-G82" type="Segment-G82"/>
                   <xsd:element name="Segment-N9" type="Segment-N9" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
                   <xsd:element name="Loop-LS" type="Loop-LS" minOccurs="0" nillable="true"/>
                   <xsd:element name="Segment-G72" type="Segment-G72" minOccurs="0" maxOccurs="20" nillable="true"/>
                   <xsd:element name="Segment-G23" type="Segment-G23" minOccurs="0" maxOccurs="20" nillable="true"/>
                   <xsd:element name="Segment-G84" type="Segment-G84"/>
                   <xsd:element name="Segment-G86" type="Segment-G86"/>
                   <xsd:element name="Segment-G85" type="Segment-G85"/>
                   <xsd:element name="Segment-SE" type="Segment-SE"/>
              </xsd:sequence>
              <xsd:attribute name="Type" default="Transaction" type="xsd:string"/>
              <xsd:attribute name="ID" default="894" type="xsd:string"/>
              <xsd:attribute name="Name" default="Delivery/Return Base Record" type="xsd:string"/>
              <xsd:attribute name="XDataVersion" fixed="2.0" type="xsd:string"/>
              <xsd:attribute name="Standard" fixed="X12" use="required" type="xsd:string"/>
              <xsd:attribute name="Version" default="V5010" type="xsd:string"/>
              <xsd:attribute name="GUID" type="GUID"/>
              <xsd:attribute name="CreatedBy" type="xsd:string"/>
              <xsd:attribute name="CreatedDate" type="xsd:dateTime"/>
         </xsd:complexType>
         <xsd:simpleType name="GUID">
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="EDI-Element-String-Type">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:string">
                        <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                        <xsd:attribute name="EDIDataType" type="xsd:string"/>
                        <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                        <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                        <xsd:attribute name="ID" type="xsd:string"/>
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="EDI-Element-Integer-Type">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:integer">
                        <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                        <xsd:attribute name="EDIDataType" type="xsd:string"/>
                        <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                        <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                        <xsd:attribute name="ID" type="xsd:string"/>
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="EDI-Element-Decimal-Type">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:decimal">
                        <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                        <xsd:attribute name="EDIDataType" type="xsd:string"/>
                        <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                        <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                        <xsd:attribute name="ID" type="xsd:string"/>
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="EDI-Element-hexBinary-Type">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:hexBinary">
                        <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                        <xsd:attribute name="EDIDataType" type="xsd:string"/>
                        <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                        <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                        <xsd:attribute name="ID" type="xsd:string"/>
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="EDI-Element-base64Binary-Type">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:base64Binary">
                        <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                        <xsd:attribute name="EDIDataType" type="xsd:string"/>
                        <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                        <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                        <xsd:attribute name="ID" type="xsd:string"/>
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="EDI-Element-Any-Type">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:string">
                        <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                        <xsd:attribute name="EDIDataType" type="xsd:string"/>
                        <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                        <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                        <xsd:attribute name="ID" type="xsd:string"/>
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="Internal-Properties">
              <xsd:sequence>
                   <xsd:element name="Data-Structure" type="Data-Structure" minOccurs="0" maxOccurs="unbounded"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="Data-Structure">
              <xsd:sequence>
                   <xsd:element name="Lookup" type="Lookup" minOccurs="0" maxOccurs="unbounded"/>
                   <xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/>
                   <xsd:element name="Data-Structure" type="Data-Structure" minOccurs="0" maxOccurs="unbounded"/>
              </xsd:sequence>
              <xsd:attribute name="Name" type="xsd:string"/>
              <xsd:attribute name="GUID" type="GUID"/>
         </xsd:complexType>
         <xsd:complexType name="Lookup">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:string">
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="Property">
              <xsd:simpleContent>
                   <xsd:extension base="xsd:string">
                        <xsd:attribute name="Name" type="xsd:string"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="Segment-ST">
              <xsd:annotation>
                   <xsd:documentation>To indicate the start of a transaction set and to assign a control number</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Element-143" type="Element-143"/>
                   <xsd:element name="Element-329" type="Element-329"/>
                   <xsd:element name="Element-1705" type="Element-1705" minOccurs="0" nillable="true"/>
              </xsd:sequence>
              <xsd:attribute name="Type" default="Segment" type="xsd:string"/>
              <xsd:attribute name="ID" default="ST" type="xsd:string"/>
              <xsd:attribute name="Name" default="Transaction Set Header" type="xsd:string"/>
         </xsd:complexType>
         <xsd:complexType name="Element-143">
              <xsd:annotation>
                   <xsd:documentation>Code uniquely identifying a Transaction Set </xsd:documentation>
              </xsd:annotation>
              <xsd:simpleContent>
                   <xsd:restriction base="EDI-Element-String-Type">
                        <xsd:enumeration value="100"/>
                        <xsd:enumeration value="101"/>
                        <xsd:enumeration value="102"/>
                        <xsd:enumeration value="103"/>
                        <xsd:enumeration value="104"/>
                        <xsd:enumeration value="105"/>
                        <xsd:enumeration value="106"/>
                        <xsd:enumeration value="107"/>
                        <xsd:enumeration value="108"/>
                        <xsd:enumeration value="109"/>
                        <xsd:enumeration value="110"/>
                        <xsd:enumeration value="111"/>
                        <xsd:enumeration value="112"/>
                        <xsd:enumeration value="113"/>
                        <xsd:enumeration value="120"/>
                        <xsd:enumeration value="121"/>
                        <xsd:enumeration value="124"/>
                        <xsd:enumeration value="125"/>
                        <xsd:enumeration value="126"/>
                        <xsd:enumeration value="127"/>
                        <xsd:enumeration value="128"/>
                        <xsd:enumeration value="129"/>
                        <xsd:enumeration value="130"/>
                        <xsd:enumeration value="131"/>
                        <xsd:enumeration value="132"/>
                        <xsd:enumeration value="133"/>
                        <xsd:enumeration value="135"/>
                        <xsd:enumeration value="138"/>
                        <xsd:enumeration value="139"/>
                        <xsd:enumeration value="140"/>
                        <xsd:enumeration value="141"/>
                        <xsd:enumeration value="142"/>
                        <xsd:enumeration value="143"/>
                        <xsd:enumeration value="144"/>
                        <xsd:enumeration value="146"/>
                        <xsd:enumeration value="147"/>
                        <xsd:enumeration value="148"/>
                        <xsd:enumeration value="149"/>
                        <xsd:enumeration value="150"/>
                        <xsd:enumeration value="151"/>
                        <xsd:enumeration value="152"/>
                        <xsd:enumeration value="153"/>
                        <xsd:enumeration value="154"/>
                        <xsd:enumeration value="155"/>
                        <xsd:enumeration value="157"/>
                        <xsd:enumeration value="158"/>
                        <xsd:enumeration value="159"/>
                        <xsd:enumeration value="160"/>
                        <xsd:enumeration value="161"/>
                        <xsd:enumeration value="163"/>
                        <xsd:enumeration value="170"/>
                        <xsd:enumeration value="175"/>
                        <xsd:enumeration value="176"/>
                        <xsd:enumeration value="179"/>
                        <xsd:enumeration value="180"/>
                        <xsd:enumeration value="185"/>
                        <xsd:enumeration value="186"/>
                        <xsd:enumeration value="187"/>
                        <xsd:enumeration value="188"/>
                        <xsd:enumeration value="189"/>
                        <xsd:enumeration value="190"/>
                        <xsd:enumeration value="191"/>
                        <xsd:enumeration value="194"/>
                        <xsd:enumeration value="195"/>
                        <xsd:enumeration value="196"/>
                        <xsd:enumeration value="197"/>
                        <xsd:enumeration value="198"/>
                        <xsd:enumeration value="199"/>
                        <xsd:enumeration value="200"/>
                        <xsd:enumeration value="201"/>
                        <xsd:enumeration value="202"/>
                        <xsd:enumeration value="203"/>
                        <xsd:enumeration value="204"/>
                        <xsd:enumeration value="205"/>
                        <xsd:enumeration value="206"/>
                        <xsd:enumeration value="210"/>
                        <xsd:enumeration value="211"/>
                        <xsd:enumeration value="212"/>
                        <xsd:enumeration value="213"/>
                        <xsd:enumeration value="214"/>
                        <xsd:enumeration value="215"/>
                        <xsd:enumeration value="216"/>
                        <xsd:enumeration value="217"/>
                        <xsd:enumeration value="219"/>
                        <xsd:enumeration value="220"/>
                        <xsd:enumeration value="222"/>
                        <xsd:enumeration value="223"/>
                        <xsd:enumeration value="224"/>
                        <xsd:enumeration value="225"/>
                        <xsd:enumeration value="227"/>
                        <xsd:enumeration value="228"/>
                        <xsd:enumeration value="240"/>
                        <xsd:enumeration value="242"/>
                        <xsd:enumeration value="244"/>
                        <xsd:enumeration value="245"/>
                        <xsd:enumeration value="248"/>
                        <xsd:enumeration value="249"/>
                        <xsd:enumeration value="250"/>
                        <xsd:enumeration value="251"/>
                        <xsd:enumeration value="252"/>
                        <xsd:enumeration value="255"/>
                        <xsd:enumeration value="256"/>
                        <xsd:enumeration value="259"/>
                        <xsd:enumeration value="260"/>
                        <xsd:enumeration value="261"/>
                        <xsd:enumeration value="262"/>
                        <xsd:enumeration value="263"/>
                        <xsd:enumeration value="264"/>
                        <xsd:enumeration value="265"/>
                        <xsd:enumeration value="266"/>
                        <xsd:enumeration value="267"/>
                        <xsd:enumeration value="268"/>
                        <xsd:enumeration value="269"/>
                        <xsd:enumeration value="270"/>
                        <xsd:enumeration value="271"/>
                        <xsd:enumeration value="272"/>
                        <xsd:enumeration value="273"/>
                        <xsd:enumeration value="274"/>
                        <xsd:enumeration value="275"/>
                        <xsd:enumeration value="276"/>
                        <xsd:enumeration value="277"/>
                        <xsd:enumeration value="278"/>
                        <xsd:enumeration value="280"/>
                        <xsd:enumeration value="283"/>
                        <xsd:enumeration value="284"/>
                        <xsd:enumeration value="285"/>
                        <xsd:enumeration value="286"/>
                        <xsd:enumeration value="288"/>
                        <xsd:enumeration value="290"/>
                        <xsd:enumeration value="300"/>
                        <xsd:enumeration value="301"/>
                        <xsd:enumeration value="303"/>
                        <xsd:enumeration value="304"/>
                        <xsd:enumeration value="309"/>
                        <xsd:enumeration value="310"/>
                        <xsd:enumeration value="311"/>
                        <xsd:enumeration value="312"/>
                        <xsd:enumeration value="313"/>
                        <xsd:enumeration value="315"/>
                        <xsd:enumeration value="317"/>
                        <xsd:enumeration value="319"/>
                        <xsd:enumeration value="322"/>
                        <xsd:enumeration value="323"/>
                        <xsd:enumeration value="324"/>
                        <xsd:enumeration value="325"/>
                        <xsd:enumeration value="326"/>
                        <xsd:enumeration value="350"/>
                        <xsd:enumeration value="352"/>
                        <xsd:enumeration value="353"/>
                        <xsd:enumeration value="354"/>
                        <xsd:enumeration value="355"/>
                        <xsd:enumeration value="356"/>
                        <xsd:enumeration value="357"/>
                        <xsd:enumeration value="358"/>
                        <xsd:enumeration value="361"/>
                        <xsd:enumeration value="362"/>
                        <xsd:enumeration value="404"/>
                        <xsd:enumeration value="410"/>
                        <xsd:enumeration value="412"/>
                        <xsd:enumeration value="414"/>
                        <xsd:enumeration value="417"/>
                        <xsd:enumeration value="418"/>
                        <xsd:enumeration value="419"/>
                        <xsd:enumeration value="420"/>
                        <xsd:enumeration value="421"/>
                        <xsd:enumeration value="422"/>
                        <xsd:enumeration value="423"/>
                        <xsd:enumeration value="424"/>
                        <xsd:enumeration value="425"/>
                        <xsd:enumeration value="426"/>
                        <xsd:enumeration value="429"/>
                        <xsd:enumeration value="431"/>
                        <xsd:enumeration value="432"/>
                        <xsd:enumeration value="433"/>
                        <xsd:enumeration value="434"/>
                        <xsd:enumeration value="435"/>
                        <xsd:enumeration value="436"/>
                        <xsd:enumeration value="437"/>
                        <xsd:enumeration value="440"/>
                        <xsd:enumeration value="451"/>
                        <xsd:enumeration value="452"/>
                        <xsd:enumeration value="453"/>
                        <xsd:enumeration value="455"/>
                        <xsd:enumeration value="456"/>
                        <xsd:enumeration value="460"/>
                        <xsd:enumeration value="463"/>
                        <xsd:enumeration value="466"/>
                        <xsd:enumeration value="468"/>
                        <xsd:enumeration value="470"/>
                        <xsd:enumeration value="475"/>
                        <xsd:enumeration value="485"/>
                        <xsd:enumeration value="486"/>
                        <xsd:enumeration value="490"/>
                        <xsd:enumeration value="492"/>
                        <xsd:enumeration value="494"/>
                        <xsd:enumeration value="500"/>
                        <xsd:enumeration value="501"/>
                        <xsd:enumeration value="503"/>
                        <xsd:enumeration value="504"/>
                        <xsd:enumeration value="511"/>
                        <xsd:enumeration value="517"/>
                        <xsd:enumeration value="521"/>
                        <xsd:enumeration value="527"/>
                        <xsd:enumeration value="536"/>
                        <xsd:enumeration value="540"/>
                        <xsd:enumeration value="561"/>
                        <xsd:enumeration value="567"/>
                        <xsd:enumeration value="568"/>
                        <xsd:enumeration value="601"/>
                        <xsd:enumeration value="602"/>
                        <xsd:enumeration value="620"/>
                        <xsd:enumeration value="625"/>
                        <xsd:enumeration value="650"/>
                        <xsd:enumeration value="715"/>
                        <xsd:enumeration value="753"/>
                        <xsd:enumeration value="754"/>
                        <xsd:enumeration value="805"/>
                        <xsd:enumeration value="806"/>
                        <xsd:enumeration value="810"/>
                        <xsd:enumeration value="811"/>
                        <xsd:enumeration value="812"/>
                        <xsd:enumeration value="813"/>
                        <xsd:enumeration value="814"/>
                        <xsd:enumeration value="815"/>
                        <xsd:enumeration value="816"/>
                        <xsd:enumeration value="818"/>
                        <xsd:enumeration value="819"/>
                        <xsd:enumeration value="820"/>
                        <xsd:enumeration value="821"/>
                        <xsd:enumeration value="822"/>
                        <xsd:enumeration value="823"/>
                        <xsd:enumeration value="824"/>
                        <xsd:enumeration value="826"/>
                        <xsd:enumeration value="827"/>
                        <xsd:enumeration value="828"/>
                        <xsd:enumeration value="829"/>
                        <xsd:enumeration value="830"/>
                        <xsd:enumeration value="831"/>
                        <xsd:enumeration value="832"/>
                        <xsd:enumeration value="833"/>
                        <xsd:enumeration value="834"/>
                        <xsd:enumeration value="835"/>
                        <xsd:enumeration value="836"/>
                        <xsd:enumeration value="837"/>
                        <xsd:enumeration value="838"/>
                        <xsd:enumeration value="839"/>
                        <xsd:enumeration value="840"/>
                        <xsd:enumeration value="841"/>
                        <xsd:enumeration value="842"/>
                        <xsd:enumeration value="843"/>
                        <xsd:enumeration value="844"/>
                        <xsd:enumeration value="845"/>
                        <xsd:enumeration value="846"/>
                        <xsd:enumeration value="847"/>
                        <xsd:enumeration value="848"/>
                        <xsd:enumeration value="849"/>
                        <xsd:enumeration value="850"/>
                        <xsd:enumeration value="851"/>
                        <xsd:enumeration value="852"/>
                        <xsd:enumeration value="853"/>
                        <xsd:enumeration value="854"/>
                        <xsd:enumeration value="855"/>
                        <xsd:enumeration value="856"/>
                        <xsd:enumeration value="857"/>
                        <xsd:enumeration value="858"/>
                        <xsd:enumeration value="859"/>
                        <xsd:enumeration value="860"/>
                        <xsd:enumeration value="861"/>
                        <xsd:enumeration value="862"/>
                        <xsd:enumeration value="863"/>
                        <xsd:enumeration value="864"/>
                        <xsd:enumeration value="865"/>
                        <xsd:enumeration value="866"/>
                        <xsd:enumeration value="867"/>
                        <xsd:enumeration value="868"/>
                        <xsd:enumeration value="869"/>
                        <xsd:enumeration value="870"/>
                        <xsd:enumeration value="871"/>
                        <xsd:enumeration value="872"/>
                        <xsd:enumeration value="873"/>
                        <xsd:enumeration value="874"/>
                        <xsd:enumeration value="875"/>
                        <xsd:enumeration value="876"/>
                        <xsd:enumeration value="877"/>
                        <xsd:enumeration value="878"/>
                        <xsd:enumeration value="879"/>
                        <xsd:enumeration value="880"/>
                        <xsd:enumeration value="881"/>
                        <xsd:enumeration value="882"/>
                        <xsd:enumeration value="883"/>
                        <xsd:enumeration value="884"/>
                        <xsd:enumeration value="885"/>
                        <xsd:enumeration value="886"/>
                        <xsd:enumeration value="887"/>
                        <xsd:enumeration value="888"/>
                        <xsd:enumeration value="889"/>
                        <xsd:enumeration value="891"/>
                        <xsd:enumeration value="893"/>
                        <xsd:enumeration value="894"/>
                        <xsd:enumeration value="895"/>
                        <xsd:enumeration value="896"/>
                        <xsd:enumeration value="920"/>
                        <xsd:enumeration value="924"/>
                        <xsd:enumeration value="925"/>
                        <xsd:enumeration value="926"/>
                        <xsd:enumeration value="928"/>
                        <xsd:enumeration value="940"/>
                        <xsd:enumeration value="943"/>
                        <xsd:enumeration value="944"/>
                        <xsd:enumeration value="945"/>
                        <xsd:enumeration value="947"/>
                        <xsd:enumeration value="980"/>
                        <xsd:enumeration value="990"/>
                        <xsd:enumeration value="993"/>
                        <xsd:enumeration value="996"/>
                        <xsd:enumeration value="997"/>
                        <xsd:enumeration value="998"/>
                        <xsd:enumeration value="999"/>
                        <xsd:attribute name="EDIDataType" fixed="ID" type="xsd:string"/>
                        <xsd:attribute name="ID" fixed="143" type="xsd:string"/>
                        <xsd:attribute name="Name" fixed="Transaction Set Identifier Code" type="xsd:string"/>
                   </xsd:restriction>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="Element-329">
              <xsd:annotation>
                   <xsd:documentation>Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set </xsd:documentation>
              </xsd:annotation>
              <xsd:simpleContent>
                   <xsd:restriction base="EDI-Element-String-Type">
                        <xsd:minLength value="4"/>
                        <xsd:maxLength value="9"/>
                        <xsd:attribute name="EDIDataType" fixed="AN" type="xsd:string"/>
                        <xsd:attribute name="ID" fixed="329" type="xsd:string"/>
                        <xsd:attribute name="Name" fixed="Transaction Set Control Number" type="xsd:string"/>
                   </xsd:restriction>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="Element-1705">
              <xsd:annotation>
                   <xsd:documentation>Reference assigned to identify Implementation Convention </xsd:documentation>
              </xsd:annotation>
              <xsd:simpleContent>
                   <xsd:restriction base="EDI-Element-String-Type">
                        <xsd:minLength value="1"/>
                        <xsd:maxLength value="35"/>
                        <xsd:attribute name="EDIDataType" fixed="AN" type="xsd:string"/>
                        <xsd:attribute name="ID" fixed="1705" type="xsd:string"/>
                        <xsd:attribute name="Name" fixed="Implementation Convention Reference" type="xsd:string"/>
                   </xsd:restriction>
              </xsd:simpleContent>
         </xsd:complexType>
         <xsd:complexType name="Segment-G82">
              <xsd:annotation>
                   <xsd:documentation>To transmit identifying numbers, dates, and other basic data relating to the transaction set</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Element-478" type="Element-478"/>
                   <xsd:element name="Element-861" type="Element-861"/>
                   <xsd:element name="Element-860" type="Element-860"/>
    Regards,
    Suneel Jakka

  • Parse xml document with xpath

    I would like to parse an xml document using xpath, see:
    http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html
    however, in the documentation (in the link above), it states that I need J2SE 5.0.
    Currently, I have:
    $ java -version
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    Does that mean that I really have to install J2SE 5.0 in order to use J2SE 5.0's XPath support? Does anybody know anything about getting started with XPath, and whether I can just use my existing version of Java? I've never used XPath.
    For more documentation, one can view:
    http://www.w3.org/TR/xpath20/
    Thank you.

    I have copied the code for the xpath tutorial on
    http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html
    exactly as it is on the tutorial, and imported the correct jars (I think).
    But still my code is giving lots of errors!
    Granted its my first shot but anyway here's the code and the errors...
    package test;
    import org.jdom.xpath.*;
    import java.io.*;
    import javax.xml.xpath.*;
    public class XPath {
         public static void main (String [] args){
              XPathFactory factory = XPathFactory.newInstance();
              XPath xPath=factory.newXPath();
              XPathExpression  xPathExpression=xPath.compile("/catalog/journal/article[@date='January-2004']/title");
              File xmlDocument = new File("/home/myrmen/workspace/Testing/test/catalog.xml");     
              //FileInputStream fis = new FileInputStream(xmldocument); 
              InputSource inputSource = new InputSource(new FileInputStream(xmlDocument));
              String title = xPathExpression.evaluate(inputSource);
              String publisher = xPath.evaluate("/catalog/journal/@publisher", inputSource);
              String expression="/catalog/journal/article";
              NodeSet nodes = (NodeSet) xPath.evaluate(expression, inputSource, XPathConstants.NODESET);
              NodeList nodeList=(NodeList)nodes;
              SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
              org.jdom.Document jdomDocument = saxBuilder.build(xmlDocument);
              org.jdom.Attribute levelNode = (org.jdom.Attribute)(XPath.selectSingleNode(jdomDocument,"/catalog//journal[@title='JavaTechnology']" + "//article[@date='January-2004']/@level"));
              levelNode.setValue("Intermediate");
              org.jdom.Element titleNode = (org.jdom.Element) XPath.selectSingleNode( jdomDocument,"/catalog//journal//article[@date='January-2004']/title");
              titleNode.setText("Service Oriented Architecture Frameworks");
              java.util.List nodeList = XPath.selectNodes(jdomDocument,"/catalog//journal[@title='Java Technology']//article");
              Iterator iter=nodeList.iterator();
              while(iter.hasNext()) {
                   org.jdom.Element element = (org.jdom.Element) iter.next();
                   element.setAttribute("section", "Java Technology");
              XPath xpath = XPath.newInstance("/catalog//journal:journal//article/@journal:level");
              xpath.addNamespace("journal", "http://www.w3.org/2001/XMLSchema-Instance");
              levelNode = (org.jdom.Attribute) xpath.selectSingleNode(jdomDocument);
              levelNode.setValue("Advanced");
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         Type mismatch: cannot convert from XPath to XPath
         The method compile(String) is undefined for the type XPath
         InputSource cannot be resolved to a type
         InputSource cannot be resolved to a type
         NodeSet cannot be resolved to a type
         NodeSet cannot be resolved to a type
         NodeList cannot be resolved to a type
         NodeList cannot be resolved to a type
         SAXBuilder cannot be resolved to a type
         SAXBuilder cannot be resolved to a type
         The method selectSingleNode(Document, String) is undefined for the type XPath
         The method selectSingleNode(Document, String) is undefined for the type XPath
         Duplicate local variable nodeList
         The method selectNodes(Document, String) is undefined for the type XPath
         Iterator cannot be resolved to a type
         The method newInstance(String) is undefined for the type XPath
         The method addNamespace(String, String) is undefined for the type XPath
         The method selectSingleNode(Document) is undefined for the type XPath
         at test.XPath.main(XPath.java:12)

  • Crystal Report XI R2 Validate Start Date - End Date

    Hi All,
    I want to validate that Start Date is not greater than End Date.
    Thanks,
    Rick

    Hello Raghavendra,
    It's good to setup one parameter if take Range method.
    But when we use any parament as range, then the parameter value can't be displayed in the report? (Blank)
    Wonder if you can solve the printout of parameter value problem, then it's wonderful to use this kind of parameter, .... because the parameter input window will get shorten than the from-to parameters
    Best regards,
    Michelle

  • Create xml document by xpath in java

    as i know, i can navigate existing xml document by xpath in java, i wonder if i can create a xml document framework by xpath in java?
    something like:
    Document doc = someobject.create(xpath expression);
    then i can use DOM to fill the framework?
    Thanks

    Please refer
    http://www.packtpub.com/article/xpath-support-in-oracle-jdeveloper-xdk-11g

  • Force Word to start each document in separate process

    We have 64 bit windows 7 with Office Word 2013. Native word 2013 document starts every document in its own winword.exe process.
    However, if i open a word document created with word 2010 it will reuse an already existing winword.exe process(if it exists).
    Hence, i need to prevent old documents from reusing existing word processes.
    What I know is that you can send the switch “/w” along with the old document to force it to start within its own winword.exe process.
    Though this might be one solution i need another approach to force documents to start within its own process.
    One solution that I have been investigating is to modify the switch in the windows registry in order to force documents to start within its own process.
    So, if you know of any other solution or any other resource that could help me modify the registry, please send me a message
    Br
    /Peter
    Peter

    Hi Peter,
    >> We have 64 bit windows 7 with Office Word 2013. Native word 2013 document starts every document in its own winword.exe process.
    In my test environment (Windows 8.1 + Office 2013), the document created by Word 2013 also use the existing winword.exe process.
    >> One solution that I have been investigating is to modify the switch in the windows registry in order to force documents to start within its own process.
    As far as I know, you could add “/w” parameter in registry:
    ”HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\command”
    Hope it will help. By the way, for questions about features for Office Products, I recommend you posting them on
    Technet forums - Microsoft Office.
    Regards,
    Jeffrey
    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.

  • Using XPath to create Document node

    Hi, could anyone suggest how to create Document nodes using xpaths with the help of some api (dom4j, JAXP, etc)?
    For example:
    With xpath="//A/B", I need to produce:
    <A>
    <B>.. </B>
    </A>
    XPath is usually used for querying XML document, but now I need to do the reverse.
    Thanks.

    DrClap, thanks for your reply.
    Yes, the topic title is a bit misleading. I shouldn't call it "Document" node.
    "And you have an XPath expression of a very restricted form which is supposed to describe the structure of that document."
    Not really, what I have is a bunch of xpath expressions, each of them describe a element in a xml.
    With these xpath expressions, in the end of the day I need to create a xml document with these elements.
    For example, if I have
    //A/B
    //A/C
    //A/D
    I need to create a xml like this:
    <A>
    <B> ...</B>
    <C>....</C>
    <D>.....</D>
    </A>
    While I could do this in a manual way (creating each element from the root and adding children one by one....), I'm sure dom4j (or other packages) can do this but I couldn't find how.

  • Identifying Changed Dates on Documents in SAP B1

    Greetingsu2026I have an unusual request that is somewhat long, very serious, and hope folks can help. 
    A headquarters customer believes a subsidiary company has u2018made upu2019 dates on invoices for previous billings.  They describe the date changes as u2018radicalu2019 but I have not personally seen these invoices as of yet and am waiting a FAX.  They requested I go into SAP B1 to see if someone has fabricated or made up or changed invoice dates and who it was.  They have some specific large-dollar invoices identified to research.  The person under suspect (who is no longer there) was considered an expert in SAP B1, so maybe she knew all of the different ways to change dates around.  Being an expert means also she might have used some unusual ways to change dates to the ones she wanted.
    Here are some of my ideas to discover this situation, but I hope someone can suggest even more steps because I would like to know every way that this situation can be discovered.
    1. Open the AR Invoices and use Data > Change Log and concentrate on dates.
    2. Run some SQL to validate document dates and system dates.  SELECT T0.DocNum, T0.DocDate, T0.CreateDate, T0.TaxDate, T0.UpdateDate FROM OINV T0 WHERE (T0.DocDate does not equal T0.CreateDate OR T0.TaxDate does not equal T0.CreateDate).  The results would show invoices that maybe had their dates changed.
    3.Run a Document Journal in the Financial Module.  Finance > Financial Reports > Accounting > Document Journal with the u2018Expanded Selectionu2019 of AR Invoices and a date range covering the invoices in question.  Then see if the Transaction Numbers are out of sequence.
    4. Run a Transaction Journal Report Financials > Financial Reports > Accounting > Transaction Journal Report with AR Invoices.  Compare this report to Document Journal.
    5. Run the Utilities functions of Utilities > Check Document Numbering to see if there any anomalies there in the document numbers.
    6. Run the Administration > System Initialization > Document Numbering function to see if a special series has been set up.
    7. Check out the AR Invoice numbering order by running another simple SQL covering a range of the invoices in question. SELECT T0.DocNum, T0.TaxDate, T0.CreateDate, T0.UpdateDate FROM OINV T0 WHERE T0.DocNum > 1583 AND T0.DocNum < 3251 ORDER BY T0.CreateDate.  Then see if the AR Invoice Numbering Sequence is not consistent.
    8. Check out those documents that are connected to each suspect AR Invoice and their associated dates by using the Target and Base Document icons.  For example, if a Deliver Document has dates of January 2007 but the AR Invoice date is September 2006, then someone has played around with dates on at least one of the documents.
    9. Get copies of the complete company database before the alleged changes were made and a company database as of today and compare the two contents.  Only good if the backups are maintained for a long time.
    Here come the questions on the ways I BELIEVE dates can be changed but not sure how to find and need to work on them:
    QUESTION 1 u2013 If a person DTWs invoices up into SAP B1, how can I tell that DTW was used to change the dates, the date of the DTW run, and the dates that were changed?
    QUESTION 2 u2013 If a person uses SQL to update dates on SAP B1, how can I find out that SQL has been used, the date of the SQL run, and the dates that were changed?
    QUESTION 3 u2013 If a person goes out and changes the workstation and/or server Date and Timestamp Properties, how can I find that they did that and the date changes?  You can do this on your PC by just changing the month, date, and year in Microsoftu2019s Date and Timestamp Properties.
    QUESTION 4 u2013 I know SAP has a policy that no SQL can be used to update databases and/or tables and have been told some customers lost support because they did this.  What does SAP do to discover this in their lab?
    QUESTION 5 u2013 Are there any notes in the portals to help me find changed dates?
    QUESTION 6 u2013 Are there any logs SAP B1 produces that can help identify such changes and how do I find and use them?
    QUESTION 7 (and this is big) u2013 Are the other ways dates can be changed on AR Invoices and how would I uncover the way it was done and the needed information of Original Date and Changed Date?
    Many, many thanks for any help provided since this is a serious situation.  If you can make any suggestions it would be greatly appreciatedu2026
    Zal
    Edited by: Zal Parchem on Mar 13, 2009 7:31 AM

    Hi Zal
    If this person was an "Expert" on SAP Business One then the only way they would have changed dates would probably be directly in SQL itself. The best way to determine this would be to hope that they slipped up somewhere and forgot to change a particular date in let's say one specific table.
    For invoices, start with the post date, doc date & create date. Then check each of these to the OJDT/JDT1 tables for any discrepancies. Next check the ADOC/ADO1 table for multiple instances on the invoice. If only 1 instance then check the create date, time & user as well as the aforementioned dates between OINV/INV1 & ADOC/ADO1. If multiple instances, check the dates from 1 instance to the next (This will indicate dates being changed in the system).
    Next check the same dates against OINM table. If any of the dates do not tally then the SQL was changed directly.
    Hope this helps. Let me know if you need further assistance.
    Kind regards
    Peter Juby

Maybe you are looking for

  • How do I instal Omron blood pressure monitor soft wear on my Mac pro when the soft wear supplied only refers to Windows

    How do I instal a Omron blood pressure monitor on to my Mac Pro.It came with an installation softwear that is only compatable with Windows.I have contacted Omron and they inform me that it should be possible using Bootcamp.How do I do this.I am using

  • Why does a font change in my pdf when I print it to file?

    A client created this magazine in InDesign and exported it to a pdf. I preflighted it and printed it using Adobe PDF for my printer and unchecked the "Rely on system fonts" button. The preflighter did not indicate that any fonts were unembedded, but

  • Xcelsius Connection problem working with diferent dimensions

    Hello to everybody, Itu2019s my first post in this forum. Hope you can help me. Iu2019m working with: - BEX query designer - BEX Analyzer - Xcelsius (5.3.0.0) executing one query through web services. Example 1 In my first example everything works fi

  • EnvironmentFailureException question

    Hi, I'm relatively new to BDB... I've (part-)written a distributed crawler which uses BDB to store a persistent on-disk queue of URIs. This is the setup. +/* Open a transactional Berkeley DB engine environment. */+ EnvironmentConfig envConfig = new E

  • Opening HP forms Downloads

    I put in new Hp pint and was offered teacher downloads. They show up but I can not open them. I have tried everything for about 2 hours. I have school tomorrow!!!! Please fix this I thought this was so great as I teach at a Wakdolf School and we make