Using Powershell to read XML
I have a weird XML doc where the data is contained in the node in placed.
An example.
<computers><computerData ip-Dir="127.0.0.1" name ="eth01"/></computers>
What I want to do is get the IP address so I can edit it later. Here is the code I am using.
$path = C:\temp\temp.xml
$xdoc = New-Object -TypeName XML
$xdoc.Load($path)
[xml]XMLConfig = Get-Content -path $path
$xdoc."computers"."computerData" | Select-Object -Property "ip-Dir"
This doesn't work though. Just gives me "ip-dir : "
Any thoughts?
You can also do this but it may fail on complex documents:
PS C:\scripts> $xml.computers.computerData
ip-Dir name
127.0.0.1 eth01
127.0.0.2 eth02
127.0.0.3 eth03
127.0.0.4 eth01
PS C:\scripts> $xml.computers.computerData.Name
eth01
eth02
eth03
eth01
PS C:\scripts> $xml.computers.computerData[2]
ip-Dir name
127.0.0.3 eth03
PS C:\scripts> $xml.computers.computerData[2].'ip-Dir'
127.0.0.3
You may also have to add namespace support.
¯\_(ツ)_/¯
Similar Messages
-
How can I use SAX to Read XML in JSP?
I created a class which extend DefaultHandler of SAX. I can use java to call this class and read XML data without any problems. But I can't call this class through JSP. Looks it didn't active startElement() when I called from JSP. Do you have any ideas on this case?
======================This is java call and works==============
import java.io.*;
import java.util.*;
import ReadXmlSax;
public class ReadElement
public static void main(String argv[])
ReadXmlSax r = new ReadXmlSax();
Enumeration e = r.getAttribute("dre.xml","server","name");
try{
while (e.hasMoreElements()) {
System.out.println((String)e.nextElement());}
}catch(Throwable t){
t.printStackTrace();
======================================================================
========================This is jsp call but doesn't work=============
<%@ page import = "java.util.*" %>
<%@ page import = "java.io.*" %>
<%@ page import = "ReadXmlSax" %>
<html>
<head><title>SAX Reader</title></head>
<body>
<%
ReadXmlSax r = new ReadXmlSax();
Enumeration e = r.getAttribute("dre.xml","server","name");
while (e.hasMoreElements()) {
out.println(e.nextElement());
out.println("<br>");
%>
</body>
</html>
======================================================================maybe you just simply can't reach dre.xml from your web server!
-
Use powershell to read Environment tab checkbox from ADUC
Hello all,
In ADUC, when you pull up a user, you can see an "Environment" tab, which contains a checkbox for "Start the following program at logon:". Here's a picture:
What I would like to do is use PowerShell to see if this checkbox is checked for a user. In my Google searches however, I have found that this checkbox is contained in the infamous "UserParameters" attribute.
My question is, what is the best way to see if this checkbox is checked for a user using PowerShell? Is this checkbox contained in any other attribute that PowerShell can read, or will I need to parse the UserParameters attribute to see if it's checked?Hi Kent,
As a workaround, the script below can help you to get the option "Program file name" and "Start in", if the option "Start the following program at logon" hasn't been checked, the script below will occur error "the property
can't be found":
$user = [adsi]"LDAP://CN=username,CN=Users,DC=domain,DC=domain,DC=com"
$user.PSBase.Invokeget("TerminalServicesInitialProgram")
$user.PSBase.Invokeget("TerminalServicesWorkDirectory")
If there is anything else regarding this script, please feel free to post back.
Best Regards,
Anna Wang -
I want to use ODI to read XML messages from JMS queue and then process it..
I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
As i m very new to ODI, it will be great if you provide detailed steps..
Thanks in advance for your help....Hi,
Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
TIA,
Tedi -
Gents,
I'm a XML & JSP newbie and try to do the following: I have a xml file which can be opened with a browser so that I can see data (let's say my cd collection). Further I have a xls file which makes the display a little nicer, with colors and so. Now, I want to have a jsp page read this xml file and I'm not very succesfull, while I spent hours and hours on Google, but nothing.
What I did so far, was:
- download & install Tomcat 5.5
- make a dir under webapps\mycdcollection
- copy my xml files to webapps\mycdcollection
- make a dir webapps\mycdcollection\WEB-INF
- make a dir webapps\mycdcollection\WEB-INF\lib
- copy standard.jar & jstl.jar to BOTH webapps\mycdcollection\WEB-INF\lib as webapps\ROOT\WEB-INF\lib
Here are my questions:
- How should my web.xml in webapps\mycdcollection\WEB-INF look like?
- Should I precompile my jsp? If so, should there be a classes directory somehwere? How should I make my app know that there is a classes directory?
I'm sure I will have lots more of questions, but if you can get me on the way I'd be very thankful.hi,
u can interact with xml while in jsp. we have jstl (xml) tags to interact with the xml files.
use the jstl and copy the jar files neede for the jstl in to ur web app folder. u need to copy jstl.jar, standard.jar, jaxen.jar, and optionally (saxpath.jar and xalan.jar) based on the versions of the jstl ur using.
mail me at [email protected], if u have any problems.
Here, are some urls' go through with this,
http://www.roseindia.net/jstl/introduction.shtml
http://www-128.ibm.com/developerworks/java/library/j-jstl0318/
http://jcp.org/aboutJava/communityprocess/final/jsr052/index2.html
regards,
pavan -
Use Powershell to read contents on email message pipe to variable
Hey guys,
Got a new one for ya'll. I've been tasked with writing a powershell app that will watch an Exchange inbox and if the body of the email contains MSDS=xxxxxxxx.pdf email the xxxxxxx.pdf file to a external customer.
The email portion i know how to do no problem. I'm stumped on reading the body of the email and returning the variable xxxxx.pdf to pipe out that variable to my email function.
Tried doing some googling on this without much luck. Anyone done this before or have a tutorial/resource to point me in the right direction ?
Thanks
Rich
Rich ThompsonHere's what i've come up with just googling around throwing something quick and dirty together. I'm sure im way off on this but it's helping me visually get the idea of what i need. This is an Exchange server so i dont even know if MAPI is enabled server
side or not. Will figure that one out later on.
$olFolderInbox = 6
$outlook = new-object -com outlook.application;
$ns = $outlook.GetNameSpace("MAPI");
$inbox = $ns.GetDefaultFolder($olFolderInbox)
$inbox.items | foreach
if ($_.body -match "MSDS=")
$filename = ALL CHARACTERS AFTER "=" UP UNTIL .PDF IF MULTIPLE .PDF FILES ATTACH ALL OF THEM IN THE NEW EMAIL
Send-MailMessage -SmtpServer smtp-mail.xxxxxxxx.com -To $sender -From [email protected] -Subject "MSDS(s) Requested from TESTING, Inc." -Attachments
Rich Thompson
You cannot run Outlook on the Exchange server. It can only be run from a non-Exchange client with Outlook installed.
¯\_(ツ)_/¯ -
Change content of default.aspx for subsites using Powershell
Hi.
I need to update the content of the default.aspx of 60+ subsites in a site Collection. I am able to loop all subsites and get the corresponding default.aspx files using a PowerShell snippet like:
$site = Get-SPSite -WebApplication https://mysite.domain.no/ -Limit All
$wc = $site.allwebs | where {$_.url.StartsWith(https://mysite.domain.no/sites/blahblah/blahblahblah) }
foreach ($web in $wc){
$file = $web.GetFile("default.aspx")
The problem is I don't know whether to use the Set-Content command-let or an XMLDocument approach.
I have the file With the correct content on the local machine. I tried With $file.Parentfolder in order to use
$f = $web.GetFolder($file.ParentFolder)
$fc = $f.files
Get-ChildItem "C:\temp\default.aspx" | foreach {
$spFileCollection.add($($_.Name),$_.OpenRead(), $true)
to replace the file but this gives an error on empty folder. Can I use this approach or is there a way to change the actual content of the file?Hi Jorgen,
According to your description, my understanding is that you want to update the page content using PowerShell.
I suggest you read the content data like below:
$data = $file.OpenBinary()
$encode = New-Object System.Text.ASCIIEncoding
$test = $encode.GetString($data)
Then you can change the string you want, and then you can save it using SaveBinary() method.
Here are some detailed articles for your reference:
Reading the contents of a SharePoint library file using PowerShell
Using powershell to read/modify/rewrite sharepoint xml document
Best Regards
Zhengyu Guo
TechNet Community Support -
i want to make a schedular probably in Coldfusion or using javascript , which read xml files from a folder ,import in Indesign template then export as a pdf....
I don't think you understand: I want to open Dreamweaver and build a brand new site, then when I am done I want to host the dreamweaver site on the Business Catalyst platform. I dont want to use anything in BC to build the site, I just want to use the hosting platform. I do not want to import a BC site into dreamweaver or anything like that. I just want to use BC the same way I would use godaddy, or uhost or any other hosting provider. Based on your response you said that "of course its possible to build a BC site in Dreamweaver" I dont want to build a BC site, I want to build a Dreamweaver site and host it on the BC platform. Like I said before it doesnt seem like this is possible. As of now we can only build a new site in MUSE and integrate it into BC without using a BC template. Can you understand what I am saying. I DONT WANT TO USE A BC TEMPLATE, I WANT NOTHING TO DO WITH BC WHILE I AM BUILDING THE SITE WITH DREAMWEAVER, JUST LIKE MUSE DOES.
-
Problem in reading XML - tags in same line
Hi All,
I am using DOM to read XML , my problem is that.I can only read xml entries like folllowing- i.e when tags are in same line only... Please help.
<src from-page="jsp/Home.jsp"><navigation-case><action>loginaction</action><from-outcome>true</from-outcome><to-page>jsp/WelcomePage.jsp</to-page></navigation-case><navigation-case><action>loginaction</action><from-outcome>false</from-outcome><to-page>jsp/Error.jsp</to-page></navigation-case>
</src>
I am not able to read following XML file-
<src from-page="*">
<navigation-case>
<action>logoutaction</action>
<from-outcome>true</from-outcome>
<to-page>jsp/Home.jsp</to-page>
</navigation-case>
<navigation-case>
<action>logoutction</action>
<from-outcome>false</from-outcome>
<to-page>jsp/Error.jsp</to-page>
</navigation-case>
</src>
ThanksThanks for your response.You are right I am not handling spaces anywhere. How to do that?
Can you please help in doing this?
I am posting my code also-
parser.parse("C:/portal-config.xml");
org.w3c.dom.Document doc = parser.getDocument();
org.w3c.dom.NodeList srcList = doc.getElementsByTagName("src");
for (int i = 0; i < srcList.getLength(); i++) {
org.w3c.dom.Node sourceNode = srcList.item(i);
if (sourceNode.getAttributes().getNamedItem("from-page").getNodeValue().equalsIgnoreCase(from)) {
org.w3c.dom.NodeList navigationCaseList = sourceNode.getChildNodes();
for (int j = 1; j < navigationCaseList.getLength(); j++) {
org.w3c.dom.Node navigationCase = navigationCaseList.item(j);
org.w3c.dom.NodeList childList = navigationCase.getChildNodes();
System.out.println("node : " + navigationCase.getNodeName());
System.out.println("list : " + childList.getLength());
Node action = childList.item(0);
int type = action.getNodeType();
// case Node.ELEMENT_NODE :
System.out.println("node : " + action.getNodeName()+ " "+ action.getNodeValue());
org.w3c.dom.Node fromOutcome = action.getNextSibling();
org.w3c.dom.Node toPage = fromOutcome.getNextSibling();
System.out.println("fromOutcome : " + fromOutcome.getNodeName());
System.out.println("toPage : " + toPage.getNodeName() + " " + toPage.getNodeType());
if(action.getNodeType()==1 & fromOutcome.getNodeType()==1 & toPage.getNodeType()==1){
String actionValue = action.getTextContent();
String outValue = fromOutcome.getTextContent();
System.out.println("actionValue : " + actionValue);
System.out.println("outValue : " + outValue);
if (actionValue.equalsIgnoreCase(action1) & outValue.equalsIgnoreCase(outcome)) {
return toPage.getTextContent();
Seeking your support
Thanks -
Download RSS feed as xml file from Sharepoint Online using PowerShell
Hello
Our company sharepoint (Office 365) contains also several RSS feeds.
How it is possible to download xml file out of this feed (website) using PowerShell?
I can authenticate with sharepoint using CSOM but do not what to do next.
As service user is not administrator I cannot use "SPOService".
This script works OK for standard website, but not for Sharepoint.
$doc = New-Object System.Xml.XmlDocument
$doc.Load("http://www.{CompanySite}.com/feed/")
$doc.save("C:\temp\feed.xml")
I am getting this error when using for company Sharepoint:
"The remote server returned an error: (403) Forbidden."
Thanks for your time considering this question.
JozinHi Scott,
thanks for advice.
Combination of WebClient and Sharepoint Credentials is working OK:
$client = New-Object System.Net.WebClient
$client.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User, $SecurePassword)
$client.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
$client.DownloadFile($SiteURL, $file) -
Faster way to read XML files using power shell !!
At the moment i have about 1000 XML files (ranging from size 15kb to 120kb), I have a powershell script which extracts information and writes all extracts to the same LOG file!!
It works well but am only concerned with the time it takes!! it took about 1.5 hrs to finish the script! Is this normal?
How can i speed it up, your inputs and thoughts helps!!
Reading XML using the following syntax!
$Inputfile=[xml](Get-Content $XFILE)
Script has only foreach loop! and no other conditions.
cheers!For a small file it is about twice as fast. It gets faster as the file size gets bigger.
PS C:\scripts> Measure-Command {$xml=[xml](cat FooProx.xml -raw)}
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 275
Ticks : 2758195
TotalDays : 3.19235532407407E-06
TotalHours : 7.66165277777778E-05
TotalMinutes : 0.00459699166666667
TotalSeconds : 0.2758195
TotalMilliseconds : 275.8195
PS C:\scripts> Measure-Command {$xml.Load("$pwd\FooProx.xml")}
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 108
Ticks : 1081647
TotalDays : 1.25190625E-06
TotalHours : 3.004575E-05
TotalMinutes : 0.001802745
TotalSeconds : 0.1081647
TotalMilliseconds : 108.1647
¯\_(ツ)_/¯ -
Reading XML file using BAPI and then uploading that xml file data into SAP
I am getting a xml file from Java server. I need to take
data from this file using BAPI and need to upload into SAP using SAP.
Please tell me how to read XML files using BAPI's.<b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
<b>SDIXML_DOM_TO_XML</b> Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
<b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
<b>SDIXML_DOM_TO_DATA</b>
data: it_table like t001 occurs 0.
data: l_dom TYPE REF TO IF_IXML_ELEMENT,
m_document TYPE REF TO IF_IXML_DOCUMENT,
g_ixml TYPE REF TO IF_IXML,
w_string TYPE XSTRING,
w_size TYPE I,
w_result TYPE I,
w_line TYPE STRING,
it_xml TYPE DCXMLLINES,
s_xml like line of it_xml,
w_rc like sy-subrc.
start-of-selection.
select * from t001 into table it_table.
end-of-selection.
initialize iXML-Framework ****
write: / 'initialiazing iXML:'.
class cl_ixml definition load.
g_ixml = cl_ixml=>create( ).
check not g_ixml is initial.
write: 'ok'.
create DOM from SAP data ****
write: / 'creating iXML doc:'.
m_document = g_ixml->create_document( ).
check not m_document is initial.
write: 'ok'.
write: / 'converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'IT_TABLE'
DATAOBJECT = it_table[]
IMPORTING
DATA_AS_DOM = l_dom
CHANGING
DOCUMENT = m_document
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
check not l_dom is initial.
write: / 'appending DOM to iXML doc:'.
w_rc = m_document->append_child( new_child = l_dom ).
if w_rc is initial. write 'ok'.
else. write: 'Err =', w_rc.
endif.
visualize iXML (DOM) ****
write: / 'displaying DOM:'.
CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
EXPORTING
DOCUMENT = m_document
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
convert DOM to XML doc (table) ****
write: / 'converting DOM TO XML:'.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = m_document
PRETTY_PRINT = ' '
IMPORTING
XML_AS_STRING = w_string
SIZE = w_size
TABLES
XML_AS_TABLE = it_xml
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
write: / 'XML as string of size:', w_size, / w_string.
describe table it_xml lines w_result.
write: / 'XML as table of', w_result, 'lines:'..
loop at it_xml into s_xml.
write s_xml.
endloop.
write: / 'end of processing'.
end of code
Hope this will be useful.
regards
vinod -
Reading XML file using BAPI I must use adapters .
Reading XML file using BAPI and then uploading that xml file data into SAP using BDC.
I cant take file on to my Application server I am getting the file dynamically from other file server and I need to use BAPis to read data from XML file.please tell me what should be my Import,Export and Tables parameterrs should be.
ThanksHi,
Import, export and table parameters for BAPI is required, without that BAPI will not able to collect the data from XML. What you need to do is write a Zprogram and collect the data, store that data in internal table and call the BAPI by passing required parameters.
Different Scanarios:
1) Before calling a BAPI write some other program which collects the data from XML and create a UNIX file. Try to get the data from UNIX FILE
2) If you see the XML tags, data will be in side that tags, try to get the data from XML tags and store that data in one SAP table. You can use the BAPI by fetching the data from table
3)Create a table and store the data in the table. Use the table in SAP to extract the data.
BAPI won't work without any parameters, you have to pass some parameters then the BAPI will return some values.
Hope i am clear.
Thanks&Regards,
-Suresh Revuru -
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
For the last 5 years (and in IPCC3.x/4.x,UCCX/5.x/7.x) I've used the same basic subflow to read a XML document that contains holiday dates where the queue should be closed. I've re-used this script on 20+ client installs and it's always worked. The structure of the script allows you to pass the path and filename of the XML document as parameters to the subflow. (The document is in the repository)
I loaded this script in UCCX 8.0.2 recently and it crashed with a Java.IO error. It looked like it was trying to read the file system directly and not the repository. (In the Linux appliance model this kind of makes sense but why is the step trying to read the file system directly?)
So I open a TAC case (SR# 615243125) and TAC tells me that the method of using the Create File Document step is not supported anymore and that I should specify the filename directly in the Create XML Document step
The problem that I see (aside from having to edit all my scripts that use XML files) is that the Create XML Document step is looking for the input to be a type DOCUMENT and not a type STRING. This seems to imply that I have to hardcode the document in each script that I deploy for a customer. When it was a string it was easy to construct the full file path from parameters and pass to the subflow.
Questions to the group
#1 Am I missing something here?
#2 Do you assume that you'll be able to load a script that worked fine in UCCX 7 into UCCX 8 and that it should completely function when you're doing everything according to the step reference documentation.
#3 Cisco didn’t document this in any way that I can find.
#4 How can you use the Create XML Document step in a fashion that would let you construct the path of the file and the filename previously in the script so you could pass it to a subflow ? It would seem this functionality has been killed in UCCX 8
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
(Background)
Create File Document Step
The input filename is a STRING, could be an explicit path and filename in the repository or a variable that represents that path and string
The output of this step is a DOCUMENT to be used in the Create XML Document step
The string FILE_FullPathHolidayFiles references en_us\folderName\documentName.xml
The document was properly uploaded into the repository only, NOT trying to directly read c:\foo\blah…
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
The create XML document input can only be a type DOCUMENT#1 Am I missing something here?
You are mixing two different issues together here.
The Create File Document step is indeed not needed or supported for creating an XML document. That is why there is a unique step; to trigger XML parsing within the MIVR subsystem.
Accessing the file system is restricted to a single folder within the VOS model (i.e. 8.0+). This folder is not backed up, replicated, or cleaned up automatically. It was intended to give developers some FS access as a temporary swap location only.
#2 Do you assume that you'll be able to load a script that
worked fine in UCCX 7 into UCCX 8 and that it should completely
function when you're doing everything according to the step reference
documentation.
Assume nothing; read the documentation and attend one of the dozens of partner training sessions that CCBU put on advising of the upcoming changes.
#3 Cisco didn’t document this in any way that I can find.
You're right, I guess, on the Create File vs. XML Document step. AFAIK Cisco never wrote a notice into the Step Reference Guide explicitly stating that you cannot use the Create File Document although the documentation seemed pretty clear to me without it. File system restrictions are documented in the 8.0 release notes.
Scripting and Development Series: Volume 2, Editor Step ReferenceUse the Create XML Document step to create a logical document that maps a document to another document variable (where the document has already been pre-parsed as an XML document and is ready to be accessed by the Get XML Document Data step).Use this step before the Get XML Document Data step to obtain data from a document formatted using the Extensible Markup Language (XML).
#4 How can you use the Create XML Document step in a fashion that would
let you construct the path of the file and the filename previously in
the script so you could pass it to a subflow ? It would seem this functionality has been killed in UCCX 8
No it hasn't; just concatinate a string to build the Source Document parameter the step needs. Example: "DOC[" + myFilePath + "]" -
Getting error in Mozilla, reading xml using JavaScript
Hi All,
I am working with javascript with xml, getting error in Mozilla
1. see html and xml file and check xml file path before test ---
2. please, go through the html and xml file.
read_xml.html
=================
<html>
<head>
<title>xml file using javascript</title>
<script type="text/javascript">
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
//loading xml file
function doLoadXML(xmlFile)
xmlDoc.async="false";
xmlDoc.onreadystatechange=doStateVerify;
xmlDoc.load(xmlFile);
rootData=xmlDoc.documentElement;
function doStateVerify()
if (xmlDoc.readyState != 4)
return false;
// reading xml file
function doReadXML()
alert("calling function");
doLoadXML("C:/Documents and Settings/webdeveloper06/Desktop/for_test/comp-info.xml");
alert("loading file...........");
var dataArr=new Array();
dataArr=xmlDoc.getElementsByTagName("comp-info");
for(var m=0; m <= dataArr.length-1; m++)
alert("entering inside looping here");
document.write("<Table border='1px'><tr><td>");
document.write(dataArr[m].getElementsByTagName("name")[0].firstChild.nodeValue);
document.write(dataArr[m].getElementsByTagName("description")[0].firstChild.nodeValue);
document.write(dataArr[m].getElementsByTagName("web-addr")[0].firstChild.nodeValue);
document.write(dataArr[m].getElementsByTagName("address")[0].firstChild.nodeValue);
document.write(dataArr[m].getElementsByTagName("city")[0].firstChild.nodeValue);
document.write(dataArr[m].getElementsByTagName("postal-code")[0].firstChild.nodeValue);
document.write(dataArr[m].getElementsByTagName("country")[0].firstChild.nodeValue);
document.write("</input></td></tr></table>");
</script>
</head>
<body>
<input type="button" value="Display XML Data" onClick="doReadXML()" />
</body>
</html>
com-info.xml
=========
<?xml version="1.0" encoding="iso-8859-1"?>
<itcopany>
<comp-info>
<name>xxx</name>
<description>IT Reaserch Company</description>
<web-addr>http://xxx.com</web-addr>
<address>mehdipatnam</address>
<city>Hyderabad</city>
<postal-code>777888888</postal-code>
<country>IN</country>
</comp-info>
<comp-info>
<name>yyyyy </name>
<description>Non IT Company</description>
<web-addr>http://yyyy.com</web-addr>
<address>xyxxyxyx</address>
<city>Banglore</city>
<postal-code>78878787878</postal-code>
<country>IN</country>
</comp-info>
<comp-info>
<name>zzzzzzz</name>
<description>IT Company</description>
<web-addr>http://zzzzzzz.com</web-addr>
<address>secondrabad</address>
<city>Hyderabad</city>
<postal-code>9999999999999</postal-code>
<country>IN</country>
</comp-info>
</itcopany>
output status
============
1. getting output in IE
2. not getting output in Mozilla
Can anyone Helpout, To get data in Mozilla
regards,
AbuTry to check this document Browser Support for SAP and use PAM (Product Availability Matrix) to check for the compatibility of your SAP system with the browser.
If you are only the user of the Web Dynpro you would have probably no other choice than change the browser.
Maybe you are looking for
-
Acrobat Pro 8.1.12 and Acrobat Reader 9.0 crashing when trying to print
The subject line says it all, but I upgraded my MacBook Pro to Leopard 10.5.5 and now when I select File | Print I get the spinning beach ball than Acrobat crashes. Now oddly, if I use Acrobat Reader 7.0.9, it prints perfectly. But have Acrobat Pro 8
-
Non-Display of edited photos in Bridge
I use Elements 8 and Bridge CS4 on a Mac. After editing a photo in Elements the edited version doesn't appear in Bridge until I have Refreshed which takes 3-4 minutes each time. A couple of times the edited photos have appeared in Bridge immediatel
-
Can't get Z_EASYDMS_SHOWPOPUP to work
Hi all, I'm working with a customer that uses EasyDMS. When changing s document to a certain status they would like a popup window to confirm this change. The badi DOCUMENT_MAIN01 is allready implemented and so is the function module Z_EASYDMS_SHOWPO
-
Macbook pro retina 15" to Dell 4K monitor
Hi I am thinking of buying a Macbook Pro 15" retina (top of the range with Nvidia 750) and a Dell 4K monitor (UP2414Q or UP3214Q). Can anyone confirm - preferably by having done it themselves! - that (1) either of these monitors can be connected, a
-
Snow Leopard contact sheet layout changes possible?
Unable to change contact sheet layout to suit my needs. E.g. I want 6 photos per page in two columns. The default option for two columns seems to be 2 or 4 photos/page. Ask for six and it creates two pages. The layout within the contact sheet seems t