How do I add a variable into an object as xml

I have a xml document with 2 protection order numbers. I want to get the information for one of them which is **protectionOrderNumber="1400042"**. I would like to add strPoNumber variable to the object objXmlCaseDoc. Inside this object is the xml
that was read and put inside the object. I want at the beginning of the xml code inside the objXmlCaseDoc to add the protectionOrderNumber at the end of the first line. This should be added at the beginning of the xml document. In my object (objXmlCaseDoc)
there is no variable strPoNumber. This is why I want to add it at the top. The object has xml document in it. 
It should look like this:
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" protectionOrderNumber="1400042">
My vb code: I have the variable strPoNumber and the object where the xml document is. Object name is objXmlCaseDoc
I want to add the line of code where I have comment Tranform case information into the output format near the bottom of the code.
Option Strict On
Option Explicit On
Imports System.Xml
Public Class BcaPoRequests
Shared Sub Main()
Dim objMessageProcessor As New MessageProcessor
Dim objSchemasCollection As New Msc.Integration.MessageBroker.Library.v4.SchemasCollection
Dim objTransformsCollection As New Msc.Integration.MessageBroker.Library.v4.TransformsCollection
objMessageProcessor.ProcessInputQueue(False, False, objSchemasCollection, objTransformsCollection)
End Sub
Private Class MessageProcessor
Inherits Msc.Integration.ServiceCatalog.Library.v4.SoapMessageProcessor
Protected Overrides Sub ProcessMessage(ByRef aobjBroker As ServiceCatalog.Library.v4.Broker, ByRef aobjXMLInputSoapEnvelopeDoc As System.Xml.XmlDocument, ByRef aobjInstantiatedObjectsCstrollection As Microsoft.VisualBasic.Collection, ByRef aobjConsumer As ServiceCatalog.Library.v4.Consumer)
MyBase.ProcessMessage(aobjBroker, aobjXMLInputSoapEnvelopeDoc, aobjInstantiatedObjectsCollection, aobjConsumer)
Dim objXmlMessageDoc As XmlDocument
Dim objXmlMessageNode As XmlNode
Dim objNameTable As NameTable
Dim objXMLNameSpaceManager As XmlNamespaceManager
Dim objXMLSchemaException As Xml.Schema.XmlSchemaException
Dim strCaseNumber As String
Dim strPoNumber As String
Dim objXmlCaseDoc As XmlDocument
'create a namespace manager used for queries into inputmessage (because of namespace)
objNameTable = New NameTable
objXMLNameSpaceManager = New XmlNamespaceManager(objNameTable)
objXMLNameSpaceManager.AddNamespace("ext", "http://www.courts.state.mn.us/ProtectionOrderExtension/1.0")
objXMLNameSpaceManager.AddNamespace("exc", "http://www.courts.state.mn.us/ProtectionOrderQuery/1.0")
objXMLNameSpaceManager.AddNamespace("soap", "http://www.w3.org/2003/05/soap-envelope")
objXMLNameSpaceManager.AddNamespace("wsa", "http://schemas.xmlsoap.org/ws/2004/08/addressing")
objXmlMessageNode = aobjXMLInputSoapEnvelopeDoc.DocumentElement.SelectSingleNode("soap:Body/exc:ProtectionOrderQueryRequest", objXMLNameSpaceManager)
objXmlMessageDoc = New XmlDocument
objXmlMessageDoc.LoadXml(objXmlMessageNode.OuterXml)
'Check authorization
'Validate the input message
objXMLSchemaException = aobjBroker.ValidateXmlDocument(objXmlMessageDoc, "ProtectionOrderQuery_1_0.xsd", "NiemExchanges\ProtectionOrders\Exchange", , False)
If Not objXMLSchemaException Is Nothing Then
'return fault if invalid
aobjBroker.Reply(aobjBroker.CreateSoapFault(Msc.Integration.Utility.Library.v4.Soap.udtSoapCodes.Sender, Msc.Integration.Utility.Library.v4.Xml.FormatXmlSchemaValidationErrorText(objXMLSchemaException), Msc.Integration.Utility.Library.v4.Soap.udtSoapRoles.RoleUltimateReceiver, aobjXMLInputSoapEnvelopeDoc, "soap:InvalidMessage", "soap:Body", Msc.Integration.Utility.Library.v4.Soap.GetReplyEndpointReference(aobjXMLInputSoapEnvelopeDoc), aobjXMLInputSoapEnvelopeDoc.DocumentElement.SelectSingleNode("soap:Header/wsa:MessageID", objXMLNameSpaceManager).InnerText, aobjConsumer))
Exit Sub
End If
'Get the case number and the PO number from the input message
strCaseNumber = objXmlMessageDoc.DocumentElement.SelectSingleNode("ext:CourtFileNumber", objXMLNameSpaceManager).InnerText
strPoNumber = objXmlMessageDoc.DocumentElement.SelectSingleNode("ext:ProtectionOrderID", objXMLNameSpaceManager).InnerText
'Get the case information from Mncis
'Code for calling the case
objXmlCaseDoc = Msc.Integration.Mncis.Library.v4.Case.GetIxmlForCaseNumber(strCaseNumber, "CourtCaseHeader,ProtectionOrder,SubjectParties,HearingTrialSetting", False)
'Tranform case information into the output format
End Sub
End Class
End Class
xslt code
<?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml file:///Z:/Training%20with%20Tim%20XML%20code%20various/BcaRequestIxml.xml?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:poq="http://www.courts.state.mn.us/ProtectionOrderQuery/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.1" xmlns:mscef="courts.state.mn.us/extfun" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:exsl="urn:schemas-microsoft-com:xslt" extension-element-prefixes="exsl" exclude-result-prefixes="mscef msxsl exsl">
<xsl:import href="../General/ExtensionFunctions.xsl"/>
<xsl:import href="MNCIS_PO_BCA_ProtectionOrder_1_0.xsl"/>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<!-- Path to environment folder used by document function. Relative to location of stylesheet. -->
<xsl:param name="gEnvPath">../..</xsl:param>
<xsl:template match="/">
<xsl:variable name="vPoNumber">
<xsl:value-of select="Integration/@protectionOrderNumber"/>
</xsl:variable>
<poq:ProtectionOrderQueryResponse>
<xsl:for-each select="//Integration/ProtectionOrder[ProtectionOrderNumber=$vPoNumber]">
<xsl:call-template name="ProtectionOrder"/>
</xsl:for-each>
</poq:ProtectionOrderQueryResponse>
</xsl:template>
</xsl:stylesheet>
XML document output  from my xslt code
<?xml version="1.0" encoding="UTF-8"?>
<poq:ProtectionOrderQueryResponse xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:poq="http://www.courts.state.mn.us/ProtectionOrderQuery/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.1">
<ext:ProtectionOrder xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0">
<j:CourtOrderEnforcementAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0700000</nc:IdentificationID>
</nc:OrganizationIdentification>
</j:CourtOrderEnforcementAgency>
<ext:ForeignOrderIdentification>
<nc:IdentificationID/>
<ext:ForeignOrderIdentificationTypeCode/>
</ext:ForeignOrderIdentification>
<ext:HearingHeldIndicator>false</ext:HearingHeldIndicator>
<nc:Location s:id="DB1618611387">
<nc:LocationAddress>
<nc:StructuredAddress>
<nc:LocationStreet>
<nc:StreetFullText>3434 Bohnsack Way</nc:StreetFullText>
<nc:StreetFullText>Unit 75 B</nc:StreetFullText>
<nc:StreetFullText/>
</nc:LocationStreet>
<nc:LocationCityName>New Prague</nc:LocationCityName>
<nc:LocationStateUSPostalServiceCode>MN</nc:LocationStateUSPostalServiceCode>
<nc:LocationPostalCode>56071</nc:LocationPostalCode>
</nc:StructuredAddress>
</nc:LocationAddress>
</nc:Location>
<ext:ProtectedParty>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1987-11-21</ext:PersonBirthDate>
<nc:PersonName>
<nc:PersonGivenName>Jennifer</nc:PersonGivenName>
<nc:PersonMiddleName>Marie</nc:PersonMiddleName>
<nc:PersonSurName>O'Brien</nc:PersonSurName>
<nc:PersonNameSuffixText/>
<nc:PersonFullName>O'Brien, Jennifer Marie</nc:PersonFullName>
</nc:PersonName>
<ext:PersonRaceCode/>
<nc:PersonSexCode>F</nc:PersonSexCode>
<ext:PetitionerIndicator>true</ext:PetitionerIndicator>
</ext:ProtectedParty>
<ext:ProtectedParty>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">2008-03-24</ext:PersonBirthDate>
<nc:PersonName>
<nc:PersonGivenName>Eli</nc:PersonGivenName>
<nc:PersonMiddleName>Rose</nc:PersonMiddleName>
<nc:PersonSurName>Noir</nc:PersonSurName>
<nc:PersonNameSuffixText/>
<nc:PersonFullName>Noir, Eli Rose</nc:PersonFullName>
</nc:PersonName>
<ext:PersonRaceCode/>
<nc:PersonSexCode>F</nc:PersonSexCode>
<ext:PetitionerIndicator>false</ext:PetitionerIndicator>
</ext:ProtectedParty>
<ext:ProtectionOrderBradyIndicator>N</ext:ProtectionOrderBradyIndicator>
<ext:ProtectionOrderCondition>
<ext:ConditionText>Respondent must not have any contact with the Protected Person(s) whether in person, with or through other persons, by telephone, mail, e-mail, through electronic devices, social media, or by any other means except as follows: [] </ext:ConditionText>
<ext:ConditionCode>08</ext:ConditionCode>
</ext:ProtectionOrderCondition>
<ext:ProtectionOrderCondition>
<ext:ConditionText>Respondent must stay a reasonable distance away from the residence(s) of the Protected Person(s), specifically as follows: [distance]; and Respondent must stay a reasonable distance away from ANY FUTURE RESIDENCES of the Protected Person(s). </ext:ConditionText>
<ext:ConditionCode>04</ext:ConditionCode>
</ext:ProtectionOrderCondition>
<ext:ProtectionOrderCondition>
<ext:ConditionText>Respondent shall not call or enter Petitioner's place of employment which includes all land, parking lots, and buildings at: </ext:ConditionText>
<ext:ConditionCode>04</ext:ConditionCode>
</ext:ProtectionOrderCondition>
<ext:ProtectionOrderExpirationDate>2015-12-22</ext:ProtectionOrderExpirationDate>
<ext:ProtectionOrderFinding>
<ext:FindingText>Respondent personally appeared or had reasonable notice and opportunity to be heard. The procedures for service upon Respondent set forth in the Minnesota Domestic Abuse Act (Minn.Stat. 518B.01) were followed, and the court has jurisdiction over the parties and subject matter. </ext:FindingText>
<ext:FindingCode>OAH1</ext:FindingCode>
</ext:ProtectionOrderFinding>
<ext:ProtectionOrderFinding>
<ext:FindingText>Acts of domestic abuse have occurred, including the following: [] </ext:FindingText>
<ext:FindingCode>OAH4A</ext:FindingCode>
</ext:ProtectionOrderFinding>
<ext:ProtectionOrderID>1400042</ext:ProtectionOrderID>
<ext:ProtectionOrderIssuingCourt>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN070015J</nc:IdentificationID>
</nc:OrganizationIdentification>
<ext:CourtFaxNumber>
<nc:TelephoneNumberFullID>952-496-8211</nc:TelephoneNumberFullID>
</ext:CourtFaxNumber>
<ext:CourtTelephoneNumber>
<nc:TelephoneNumberFullID>952-496-8200</nc:TelephoneNumberFullID>
<nc:TelephoneSuffixID/>
</ext:CourtTelephoneNumber>
</ext:ProtectionOrderIssuingCourt>
<ext:ProtectionOrderIssuingDate>2014-12-22</ext:ProtectionOrderIssuingDate>
<ext:ProtectionOrderIssuingJudicialOfficial>
<nc:PersonName>
<nc:PersonGivenName>Do</nc:PersonGivenName>
<nc:PersonMiddleName>P.</nc:PersonMiddleName>
<nc:PersonSurName>Ande</nc:PersonSurName>
<nc:PersonNameSuffixText/>
<nc:PersonFullName>Ande, Do P.</nc:PersonFullName>
</nc:PersonName>
</ext:ProtectionOrderIssuingJudicialOfficial>
<ext:ProtectionOrderOtherIdentification>
<nc:IdentificationID>12345</nc:IdentificationID>
<ext:ProtectionOrderOtherIdentificationTypeCode>NCICNUM</ext:ProtectionOrderOtherIdentificationTypeCode>
</ext:ProtectionOrderOtherIdentification>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0191000</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceTime>16:25:00-06:00</ext:ProtectionOrderServiceTime>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0191000</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceTime>16:25:00-06:00</ext:ProtectionOrderServiceTime>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0191000</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0250800</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-09</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYMAIL</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0720100</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2014-12-22</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderStatus>
<ext:ProtectionOrderStatusCode>SBJO</ext:ProtectionOrderStatusCode>
<ext:ProtectionOrderStatusDate>2014-12-22</ext:ProtectionOrderStatusDate>
</ext:ProtectionOrderStatus>
<ext:ProtectionOrderTypeCode>OFP</ext:ProtectionOrderTypeCode>
<ext:QualifyingRelationship>
<ext:QualifyingRelationshipCode>LIVTOGTHR</ext:QualifyingRelationshipCode>
<ext:QualifyingRelationshipText>Lived Together</ext:QualifyingRelationshipText>
</ext:QualifyingRelationship>
<ext:Respondent>
<nc:PersonEthnicityCode/>
<nc:PersonEyeColorCode/>
<nc:PersonHairColorCode>XXX</nc:PersonHairColorCode>
<nc:PersonHeightMeasure>
<nc:MeasureText>71</nc:MeasureText>
<nc:MeasureUnitText>inches</nc:MeasureUnitText>
<nc:LengthUnitCode>INH</nc:LengthUnitCode>
</nc:PersonHeightMeasure>
<ext:PersonRaceCode>W</ext:PersonRaceCode>
<nc:PersonSexCode>M</nc:PersonSexCode>
<nc:PersonWeightMeasure>
<nc:MeasureText>210</nc:MeasureText>
<nc:MeasureUnitText>pounds</nc:MeasureUnitText>
<nc:WeightUnitCode>LBR</nc:WeightUnitCode>
</nc:PersonWeightMeasure>
<ext:AddressReference ext:currentIndicator="true">
<nc:LocationReference s:ref="DB1618611387"/>
</ext:AddressReference>
<ext:PersonBirthDate ext:approximateDateIndicator="true" ext:currentIndicator="false">1990-12-23</ext:PersonBirthDate>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="false">1989-12-23</ext:PersonBirthDate>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1991-12-23</ext:PersonBirthDate>
<ext:PersonName ext:currentIndicator="true">
<nc:PersonGivenName>Guy</nc:PersonGivenName>
<nc:PersonMiddleName>Andr</nc:PersonMiddleName>
<nc:PersonSurName>Noir</nc:PersonSurName>
<nc:PersonNameSuffixText>Jr.</nc:PersonNameSuffixText>
<nc:PersonFullName>Noir Jr , Guy Andr</nc:PersonFullName>
</ext:PersonName>
</ext:Respondent>
<ext:RespondentPresentAtHearingIndicator>false</ext:RespondentPresentAtHearingIndicator>
</ext:ProtectionOrder>
<ext:SupersededProtectionOrderID xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0"/>
<ext:Hearing xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0">
<ext:HearingDateTime>2015-01-20T09:00:00-06:00</ext:HearingDateTime>
<ext:HearingLocationText>Scott County</ext:HearingLocationText>
</ext:Hearing>
</poq:ProtectionOrderQueryResponse>

Inert to root as first nood.
http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.insertbefore(v=vs.110).aspx
Dim doc As New XmlDocument()
doc.LoadXml("<book genre='novel' ISBN='1-861001-57-5'>" & _
"<title>Pride And Prejudice</title>" & _
"</book>")
Dim root As XmlNode = doc.DocumentElement
'Create a new node.
Dim elem As XmlElement = doc.CreateElement("price")
elem.InnerText = "19.95"
'Add the node to the document.
root.InsertBefore(elem, root.FirstChild)
Console.WriteLine("Display the modified XML...")
doc.Save(Console.Out)
remember make the reply as answer and vote the reply as helpful if it helps.

Similar Messages

  • How do I enter a variable into an equation?

    How do I enter a variable into an equation?

    Jacob,
    Spreadsheets don't use equations, so the usual nomenclature can be confusing.
    When you enter something into a spreadsheet cell, it is either a Literal Value (Constant), or an Expression, preceded by an equal sign, that tells the spreadsheet to display something. Every Cell Reference in the Expression is a Variable. The equal sign in this case does not signify an equality, it just signals the spreadsheet that you want it to do something, defined by the expression that follows.
    Here's an equation: A1 = B1 + C1 + 10, where B1 and C1 are variables and 10 is a constant.
    To figure out what the value of A1 is, you write an expression in cell A1. That Expression would be: =B1 + C1 + 10. The operation that is performed by the spreadsheet is that it looks at B1 and C1, adds whatever it sees there and then adds the constant 10, and displays the result in A1.
    It can get very complex. Expressions can contain Functions that catch the Time or generate a random number, or round a value, etc. Just remember that anything you see in a cell can be changed, so that content, that cell address, is a variable
    Jerry

  • How can I add advertisement code into flash game?

    hi mates,
    just want to ask about loading advertisement code!
    How do you add the advertisement code (adsense) into flash games??
    my site Funny Games have over 5k games but they are getting from others sites thus I have no original files. How can I add more code into the current files?

    Unless the games were pre-made to allow you to specify some variables in the page code or some external file, you won't be having any luck... you cannot add code to the games unless you have the source files, which you apparently don't have.

  • How to convert an int variable into String type

    hi everybody
    i want to know how to convert an interger variable into string variable
    i have to implement a code which goes like this
    Chioce ch;
    for(int i=0;i<32;i++)
    // here i need a code to convert the int variable i into a string variable
    ch.add(String variable);
    how do i convert that int variable i into a String type variable??
    can anyone help me?

    Different methods:
    int a;
    string s=a+"";or
    String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
    Ema

  • How to pass a JavaScript variable into a java method

    I would like to know how to pass a JavaScript variable into a java method with in a <% %> tag inside a JSP file like so:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <script LANGUAGE="JavaScript">
    myValue = someDynamicValue;
    <% System.out.println(myValue)%>
    </script>
    </head>
    <body>
    </body>
    </html>
    obviously "System.out.println(myValue)" will not work because myValue is seen as a java variable and not a JavaScript variable.
    I would like to know how to let the jsp file, that I wrote in the above code, see myValue as a JavaScript variable and not a java variable so that I can pass it to a java method.
    NOTE: the java method does not have to be a println() method, it can be any method of my choice.
    NOTE: someDynamicValue is a JavaScript value that can dynamically change

    I don't believe you can. JSPs are really just elaborate templates that an engine such as Tomcat parses and generates an HTML page based on. That page is then displayed to the user. By the time you want to use some function in Javascript, the JSP has already been parsed and generated.
    Basically, Javascript and JSPs can't talk to each other. One's server-side and the other is client-side.

  • How to pass a jsp variable into javascript??

    <p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <p><html>
    <p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
    <p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
    <p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
    <p>Time until next game
    <p><c:forEach var="tuple" items="${tuples}">
    <p><c:if test="${fn:contains(tuple, 'row ')}">
    <p> <p><code>
    <p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
    <p> <font color="blue">
    <p> <c:out value="${values[17]}" />
    <p><c:set var="remainingtime" value="${values[17]}" />
    <p> </font>
    <p> </code>
    <p></c:if>
    <p></c:forEach>
    <p><form name="counter"><input type="text" size="8" name="d2"></form>
    <p><script>
    <p>var milisec=0
    <p>var seconds=eval("document.myForm.remaining").value;
    <p>function display(){
    <p> if (milisec<=0){
    <p> milisec=9
    <p> seconds-=1
    <p>}
    <p>if (seconds<=-1){
    <p> milisec=0
    <p> seconds+=1
    <p> }
    <br>else
    <p> milisec-=1
    <p> document.counter.d2.value=seconds+"."+milisec
    setTimeout("display()",100)
    <p>}
    <p>display()
    <p></script>
    <p></body>
    <p></html>
    <p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001

    Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
    <html>
    <body>
    <form name=f>
    <%!
    String str = "A String"
    %>
    <script>
    var avariable = <%=str%>
    <script>
    </form>
    </body>
    </html>
    Let me know if you face any problem

  • How do I add OIC presense into my web page?

    How do I add OIC presence into my web page? with Oracle Messenger (RTC) we can use the href=rtcmsgr:sendmsg?<login_ID> what is the equivalent for Oracle Instant Chat (OIC)?

    Unfortunately, this functionality was lost in the conversion from RTC to OIC. This feature was available because of a http web presence. Oracle did not license that component in OIC.

  • How can i add Custom fields into the

    Dear Experts
    We have Ecc6.0 system,
    How can i add Custom fields into the Infotype Screen(PA30),i heard that we do it by PM01 Tcode.
    But in PM01 i am unable to find the enhance infotype tab.
    How can i do it ....pls help.....
    Regards
    Sajid

    Hi,
    Do it thru the third tab : Single Screen.
    There write down the infotype number (e.g. 0022) and say generate objects.
    Regards,
    Dilek

  • How can i add my components into dcomcnfg.exe?

    I have created a component a  out-process Server and  registered but I can't find it in
    dcomcnfg.exe.
    how can i add my components into dcomcnfg.exe?

    chenkuan,
    Sorry but you have posted to a forum that deals exclusively with questions/issues about customizing and programming Microsoft Project, a planning and scheduling application. I suggest you delete this post and find a forum appropriate for your issue.
    John

  • How to add an variable to the object name of the arraylist

    Greetings,
    i will like to create an object for arraylist with it name concat with a variable. This is what i mean as show below.
    for i=1; i <8; i++)
    ArrayList list = new ArrayList();
    What i want when it loops, the arrayliost will auto create list1, list 2, list3 and so on until the for loops end. How do i add the variable i to the object name list?
    Thanks

    Do anyone of u mind if let me know hows the code look like?This isn't intended to be an alternative to the previous reply: in fact it's worthless unless you read the information in the link given.
    import java.util.ArrayList;
    import java.util.InputMismatchException;
    import java.util.List;
    import java.util.Random;
    import java.util.Scanner;
    public class ListListEg {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            Random random = new Random();
                // create the mainList outside the for loop
            List<List<Integer>> mainList = new ArrayList<List<Integer>>();
            System.out.print("How many lists would you like? ");
            try {
                int num = in.nextInt();
                if(num <= 0) {
                    System.out.println("Smartass!");
                    System.exit(1);
                    // populate the main list inside the loop
                for(int i = 0; i < num; i++) {
                    mainList.add(new ArrayList<Integer>());
            } catch(InputMismatchException ime) {
                System.out.println("Idiot!");
                System.exit(1);
                // later do stuff with the lists, which you access with get()
            for(int i = 0; i < mainList.size(); i++) {
                for(int times = 0; times < 3; times++) {
                    mainList.get(i).add(random.nextInt());
            System.out.println("The first list is " + mainList.get(0));
            if(mainList.size() > 1) {
                System.out.println("The second list is " + mainList.get(1));
            System.out.println("The last list is " + mainList.get(mainList.size() - 1));
    }(In reality all the action would not take place in one method like this, and the exception handling would be more useful and polite.)

  • HT204655 How can I add gps information into my pictures?

    How can I add gps information into my pictures?
    I understand Photos doens't have this feature.
    Só how could I do it with an external application. Is it possible? Can I even use iPhoto with the same library (since they share stuff) to do it?

    Photos does not support to add location information yet.
    Add the GPS before you import the photos to Photos. I hope this will change with the next release.
    You could ,for example, first import to iPhoto, add the locations, batch change the titles and captions, do all the things that are not yet supported in the new Photos, then export the photos from iPhoto and import them to Photos.
    Or use the free exiftool, if you like the Terminal.
    See:  http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#geotagging_exampl es
    To install exiftool: http://www.sno.phy.queensu.ca/%7Ephil/exiftool/install.html
    Other convenient apps are Jetphoto Studio, Geotagalog, there are many more ..
    I use Jetphoto Studio, but it is not free.

  • How do I add multiple images into one file?

    I'm sure this is something that's been covered in another post (or even in the help portal) but I think my wording in my search terms are not correct or... I don't know, because I just can't find what I'm looking for.
    I want to know how to add multiple images into one file/one image, both horizontally and/or vertically. To give you an idea of what I mean, check out :
    http://www.best10apps.com/apps/comic-story,531596060.html
    If you scroll down, you'll see a heading entitled : Screenshots of Comic Story. Notice how there's 3 pictures (divided by borders). 2 of those pictures are side by side, and 1 of them is below the first 2 pictures.
    I want to know how to add different pictures/images and put them into one picture.

    One way is to create template PSD files and populate them with your images using Photoshops scripts.
    Photo Collage Toolkit UPDATED June 12, added Picture Package Support via PasteImageRoll and BatchPicturePackage scripts.
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    There are eleven scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
    PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
    Documentation and Examples

  • How to store serval char variables into a string variable?

    I have serval char variables, but i don't know how to put them together (without using arrays). I am thinking to store these char variables into a string variable but i don't know how to do it. For example,
    char letter1 = 'a', letter2 = 'b', letter3 = 'c';
    String letters;
    then how can i do to make letters = "abc" from using letter1,2,3?
    I am just a beginner of Java, if anyone can help me, i will appreciate that very much!!!

    String letters=""+leter1+letter2+letter3;is fine and dandy. What it actually compiles to is
    String letters = new StringBuffer().append(letter1).append(letter2).append(letter3).toString();Which ofcourse is much more code to write, but still good to know.
    So do see the API for java.lang.StringBuffer.
    Heikki

  • How can I add jar files into the namespace in code?

    My friends:
    I need to add jar files into my namespace dynamicly in my code.But the jar files might be repeated, I am not sure.so, i wonder how can I add them into my namespace, ignoring the repeated files?
    This is my code:
    URL[] urlArrayA = new URL[5];
    urlArray[0] = sample1;
    urlArray[1] = sample2;
    URL[] urlArrayB = new URL[5];
    urlArrayB[0] = sample3;
    urlArrayB[1] = sample4;
    URLClassLoader urlClassLoaderA = URLClassLoader.newInstance(urlArrayA);
    URLClassLoader urlClassLoaderB = URLClassLoader.newInstance(urlArrayB);
    how can i visit classes in urlClassLoaderA from classes in urlClassLoaderB?

    could anyone please answer the question for me ? thank you...

  • How to find/add matched logfile into PL/SQL

    Hi,
    I make a PL/SQl like below to automate logminer to find out DMLs done in a schema (SCOTT) after a specific time.
    declare
    v_user_name varchar2(50) := 'SCOTT';
    V_ARCHIVE_LOG_DEST VARCHAR2(50) := '/var/tmp/arch';
    V_sequence_max number;
    v_start_query_time TIMESTAMP := '08-JAN-2010 00:00:00';
    begin
    --Create DICTIONARY file on the SOURCE database's redo files
    sys.dbms_logmnr_d.build( OPTIONS => sys.DBMS_LOGMNR_D.store_in_redo_logs);
    select MAX(sequence#) into V_sequence_max from v$archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES';
    --add dictionary log files
    dbms_logmnr.add_logfile( logfilename=> 'V_ARCHIVE_LOG_DEST/1_3715_573231463.dbf',
    options=> dbms_logmnr.new);
    --add log files
    exec dbms_logmnr.add_logfile( logfilename=> 'V_ARCHIVE_LOG_DEST/1_3716_573231463.dbf');
    exec dbms_logmnr.add_logfile( logfilename=> 'V_ARCHIVE_LOG_DEST/1_3717_573231463.dbf');
    --start LogMiner, also (by the way) enable ddl tracking
    exec dbms_logmnr.start_logmnr(options => dbms_logmnr.dict_from_redo_logs + dbms_logmnr.ddl_dict_tracking);
    --To query
    execute immediate 'alter session set nls_date_format = ''dd_MM_yyyy hh24:mi:ss''';
    execute immediate 'SELECT username, sQL_REDO, SQL_UNDO FROM V$LOGMNR_CONTENTS WHERE username = ''v_user_name'' AND TIMESTAMP > ''v_start_query_time''';
    --END LOGMINER
    DBMS_LOGMNR.END_LOGMNR();
    END;
    ##########################3
    My question,
    After find out the redo logs SCN which include snapshot of data dictionary like below,
    select MAX(sequence#) into V_sequence_max from v$archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES';
    I try to
    --add dictionary log files
    dbms_logmnr.add_logfile( logfilename=> *'V_ARCHIVE_LOG_DEST/1_3715_573231463.dbf'*,
    options=> dbms_logmnr.new); ---how can I add the logfile with above SCN# here automatically, above is just manually added.
    --add log files,
    exec dbms_logmnr.add_logfile( logfilename=> 'V_ARCHIVE_LOG_DEST/1_3716_573231463.dbf');
    exec dbms_logmnr.add_logfile( logfilename=> 'V_ARCHIVE_LOG_DEST/1_3717_573231463.dbf');
    ---how can I add all the files with SCN numbers after (>MAX(sequence#) ) here automatically?? --above redo files are just manually  added
    thanks
    Edited by: ROY123 on Jan 11, 2010 12:40 PM

    Is there any reason to not use [Fine Grained Auditing|http://www.oracle.com/technology/deploy/security/database-security/fine-grained-auditing/index.html] for something like this?
    Why reinvent the wheel in a more complex fashion ?

Maybe you are looking for