Changes in files referenced by a CLIP XML file
What happens if we change a VHD file referenced by a CLIP XML file after we have created the XML file. The MD5 of the VHD files is stored int he CLIP XML file. Does this have any bearing on the actual compilation?
Say hello to my little friend.
RFC 2323 FHE-Compliant
The */faces/* part is omitted when i reference a single-pdf. This seems helpful to me cause i think this is the reason the link doesn�t work.
How do i manage now to get rid of the *"/faces/"* part in my URL ?
url="#{currentRow.value['ARTICLES.FILENAME']}"cause this code generates the URL including the *"/faces/"* part.
Similar Messages
-
Infopath 2013 SOAP Web Service Data Connection - Error: The file is not a valid XML file
Here are the steps to replicate the issue I’m having when adding lists.asmx or any other SharePoint web service in InfoPath 2013. This web service opens fine in the browser from my desktop. My account is a farm administrator and is added to the
web application’s User Policy. I can use these services just fine using Nintex 2013 Workflow.
Open InfoPath Designer 2013.
Select Blank Form and click Design Form button.
Click “Data” tab.
Click “From Web Service” and select “From SOAP Web Service”
Enter https://mysiteurl.com/_vti_bin/lists.asmx?WSDL for the web service definition.
Click Next.
Windows Security window pops up.
Enter a credential. I tried both my account and the farm account. My account is a farm admin and is added to the web application’s User Policy with Full Control.
Click OK. It prompts for credential multiple times.
I get below this error messages:
Sorry, we couldn't open https://mysiteurl.com/_vti_bin/lists.asmx?WSDL
InfoPath cannot find or cannot access the specified Web Service description.
The file is not a valid XML file.
Not enough storage is available to process this command.
We have a project that is in need of these services using InfoPath so any help is greatly appreciated.Hi Brian_TX,
For your issue, try to the following methods:
Change your service binding in web.config to:binding="basicHttpBinding". It seems in VS it defaults to wsHttpBinding.
Replace all instances of "parameters" from the web service wsdl with the name "parameter"
There are some similar articles about the issue, you can have a look at them:
http://www.infopathdev.com/forums/t/23239.aspx
https://social.msdn.microsoft.com/Forums/office/en-US/621929c3-0335-40af-8332-5a0b430901ab/problems-with-infopath-web-service-connection?forum=sharepointcustomizationprevious
https://social.msdn.microsoft.com/Forums/en-US/5fa5eca8-f8d7-4a2e-81ba-a3b4bdcfe5af/infopath-cannot-find-or-cannot-access-the-specified-web-service-description?forum=sharepointcustomizationlegacy
Best Regards
Lisa Chen
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] -
File Adapter and reading all XML files from direcotry
Problem occurs on PI 7.1
I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory.
Quality of service is: Exactly One.
Poll Interval: 30
Retry interval: 30
Processing mode: Archive with option "Add Timestamp".
Processing sequence: by name.
I though that with above configuration my File Adapter will be reading folder for all coming XML files. But somehow it is reading XMLs only when I'm activating it in Integration Builder.
Any idea what can cause such strange problem?Hi Tomasz,
As per my understanding, you need to activate the file adapter for reading the XML files on your directory. Right?
If that is the case, then the issue might be with the Cache.
1. Clear the cache from the Integration Builder.
2. Check in SXI_CACHE whether there are any issues. Click on Delta Cache refresh to find out if there are any cache related issues.
Thanks, -
How to update/change the value of elements in an xml file?
Hi Everyone,
Could any one of u tell me how to update the value of elements in an XML file, using java? The reason is i want to use an XML file as a data source (i.e. more or less like a database), without using any RDBMS, for simple applications such as to read a record and update the record. By the way, my XML file will have only one record, such as the current weather information, with fields such as temperature, humdity etc. for 1 city only.
Thanks in advance.Here is a solution how to check a particular value or element name in an xml and update the changes e to an xml.
Sample.xml
<URLConstructor>
<application name="cp_outage">
<resource>hello</resource>
<value>val</value>
</application>
<application name="cp_outage">
<resource>hello</resource>
<value>val</value>
</application>
</URLConstructor>
XMLWriter.java
package com;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.DOMBuilder;
import org.jdom.output.XMLOutputter;
// used for printing
import org.apache.xml.serialize.XMLSerializer;
import org.jdom.output.XMLOutputter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
import java.util.List;
class XMLWriter{
public void update(File fileName)
try {
DOMBuilder domBuilder=new DOMBuilder();
Document doc=domBuilder.build(fileName);
Element element=doc.getRootElement();
getChildren(element);
writeToXML(doc,fileName);
getChildren(element);
} catch (Exception e) {
e.printStackTrace();
* @param doc
private void writeToXML(Document document,File filePath)
XMLOutputter xmloutputter = new XMLOutputter();
try
FileOutputStream fileOutputStream = new FileOutputStream(filePath);
xmloutputter.output(document, fileOutputStream);
fileOutputStream.close();
catch (FileNotFoundException e)
e.printStackTrace();
catch (IOException e)
e.printStackTrace();
public void getChildren(Element element)
if(!element.hasChildren())
return;
List childrenList = element.getChildren();
Iterator itr=childrenList.iterator();
while(itr.hasNext())
Element childElement=(Element) itr.next();
if(childElement.hasChildren())
getChildren(childElement);
// System.out.println("Name "+childElement.getName());
// System.out.println("Value "+childElement.getText());
if(childElement.getText().equals("hello") || (childElement.getName().equals("resource")))
updateInfo(childElement,"New_Resource","AddedText");
* @param childElement
* @param string
* @param string2
private void updateInfo(Element element, String elementName, String value)
element.setName(elementName);
element.setText(value);
static public void main(String[] args)
XMLWriter xmlWriter=new XMLWriter();
xmlWriter.update(new File("c:/sample.xml"));
After execution the file will be changed to
<URLConstructor>
<application name="cp_outage">
<New_Resource>AddedText</New_Resource>
<value>val</value>
</application>
<application name="cp_outage">
<New_Resource>AddedText</New_Resource>
<value>val</value>
</application>
</URLConstructor>
Regards,
Maheswar -
Download created XML File in batch mode // Parse XML file into single lines
Hello!
I upload a CSV file and based on that CSV file I create an XML "object". First I uploaded and downloaded it via gui frontendclass, but as it has to be run in a batch in the night I need to upload and download the data via OPEN DATASET.
The import and transformation of the CSV file works fine, also the transfer into an itab with the same structure as a CSV line is ok. I also create the XML file, which could be downloaded easily with gui-download but it is not permittet.
Import of data: I scan the folder and get the filenames into a itab, I loop over that itab and read the single files like this:
OPEN DATASET ls_convert_batch FOR INPUT IN TEXT MODE ENCODING DEFAULT.
CLEAR tab.
IF sy-subrc = 0.
DO.
READ DATASET ls_convert_batch INTO line.
IF sy-subrc <> 0.
EXIT.
ELSE.
CLEAR tmptab.
SPLIT line AT ';' INTO tmptab-product
tmptab-contract
tmptab-extagent.
APPEND tmptab TO tab.
ENDIF.
ENDDO.
ENDIF.
The XML file has a strucutre like
<file>
- <file formant_no="1.1" format_date="02.10.2003">
<status>V</status>
<number>001001025</numbner>
<name>Schmeisser,Christof</name>
- <details>
- <detail>
<contract>00000003494</contract>
<name>Schmeisser, Christof</name>
<invoice_no>000000003840</invoice_no>
<due_date>20100601</due_date>
<amount>140,00</amount>
</detail>
- <detail>
<contract>00000003495</contract>
<name>Schmeisser, Christof</name>
<invoice_no>000000003841</invoice_no>
<due_date>20100601</due_date>
<amount>130,00</amount>
</detail>
- </details>
<elements>2</elements>
<amount_overall>270</amount_overall>
</file>
At the moment I download it like this:
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = filename
filetype = 'BIN'
* CONFIRM_OVERWRITE = '0'
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSEIF sy-subrc = 0.
lv_create_counter = lv_create_counter + 1.
ENDIF.
But I need to download it via OPEN TRANSFER CLOSE Dataset as it has to run in batch mode.
Anyone has an idea? I am really desperate here. One idea would be to parse the single lines into a string and then create the XML file line by line as text and save it with ending XML, should work. But I don't know how!
Thank you very much in advance,
kind regards from Tallinn, Estonia,
Christof!
Edited by: Christof Schmeisser on Nov 25, 2010 7:51 PM
I edited the heading, would be too general and missleading!Tipos Pools
TYPE-POOLS: ixml.
CLASS cl_ixml DEFINITION LOAD.
TYPES: BEGIN OF xml_node_type,
node TYPE char50,
vlnode TYPE string,
END OF xml_node_type,
BEGIN OF xml_line_type,
data(256) TYPE x,
END OF xml_line_type.
Tabelas Internas
DATA: ti_xml_node TYPE TABLE OF xml_node_type.
Variáveis TYPE REF
*Type REF para utilizar no XML
DATA: ixml_type TYPE REF TO if_ixml,
streamfactory_type TYPE REF TO if_ixml_stream_factory,
ostream_type TYPE REF TO if_ixml_ostream,
istream_type TYPE REF TO if_ixml_istream,
parser_type TYPE REF TO if_ixml_parser,
renderer_type TYPE REF TO if_ixml_renderer,
document_type TYPE REF TO if_ixml_document,
encoding_type TYPE REF TO if_ixml_encoding,
node_type TYPE REF TO if_ixml_node,
element_dtrans_type TYPE REF TO if_ixml_element,
element_xml_in_type TYPE REF TO if_ixml_element,
element_roteiros_type TYPE REF TO if_ixml_element,
element_roteiro_type TYPE REF TO if_ixml_element,
element_vias_type TYPE REF TO if_ixml_element,
element_via_type TYPE REF TO if_ixml_element,
element_dummy_type TYPE REF TO if_ixml_element,
gw_xml_node TYPE TABLE OF xml_node_type,
gw_xml_node_ret TYPE TABLE OF xml_node_type,
gw_xml_node_err TYPE TABLE OF xml_node_type,
gw_xml_node_xml TYPE TABLE OF xml_node_type,
gw_xml_table TYPE TABLE OF xml_line_type,
gw_xml_table2 TYPE TABLE OF xml_line_type,
gs_xml_node TYPE xml_node_type, "WA para leitura do xml
gs_xml_node_ret TYPE xml_node_type, "WA para leitura do xml retorno
gs_xml_node_err TYPE xml_node_type, "WA para leitura do xml erro
gs_xml_node_xml TYPE xml_node_type, "WA para leitura do xml info sucesso
gs_xml_table2 TYPE xml_line_type. "WA para importar xml
Variáveis do Programa
DATA: l_value TYPE string,
l_rc TYPE i,
l_xml_size TYPE i,
cod_cartaorepom TYPE char20 VALUE '123456789',
v_caminho_exp TYPE string VALUE 'C:TEMP',
v_salvaarquivo TYPE string,
v_nomearquivo TYPE string,
w_nodetext TYPE string,
v_roteiros TYPE string,
v_roteiro TYPE string,
v_roteiro_codigo TYPE string,
v_percurso_codigo TYPE string,
v_percurso_descricao TYPE string,
v_cidade_origem TYPE string,
v_estado_origem TYPE string,
v_cidade_destino TYPE string,
v_estado_destino TYPE string,
v_transporte_tipo TYPE string,
v_cartao_taxa TYPE string,
v_cobra_taxa TYPE string.
Constants
CONSTANTS: cc_39 TYPE string VALUE '39', " Numero 39.
cc_dt_trans TYPE string VALUE 'data_transfer'," document_type(name)
cc_metodo_cod TYPE string VALUE 'metodo_codigo'," document_type(name)
cc_xml_in TYPE string VALUE 'xml_in'," document_type(name)
cc_ct_tx_ativ TYPE string VALUE 'cartao_taxa_ativacao'," document_type(name)
cc_cartao TYPE string VALUE 'cartao', " Parâmetro Perform.
cc_xml TYPE string VALUE '.XML'," extenção
cc_bin TYPE char10 VALUE 'BIN'." filetype
START-OF-SELECTION.
PERFORM yf_inicia_criacao_xml USING cc_39.
element_roteiro_type = document_type->create_simple_element(
name = cc_ct_tx_ativ
parent = element_xml_in_type ).
PERFORM yf_dummy_roteiro USING cod_cartaorepom cc_cartao.
PERFORM yf_finaliza_xml.
PERFORM yf_exporta_xml USING v_caminho_exp.
PERFORM yf_convert_xml_to_itab TABLES gw_xml_node_ret
USING v_salvaarquivo.
END-OF-SELECTION.
*& Form yf_inicia_criacao_xml
text
-->VALUE(P_0783) text
FORM yf_inicia_criacao_xml USING value(p_0783).
DATA: s_encoding_type TYPE string VALUE 'ISO-8859-1'.
Cria o ixml factory
ixml_type = cl_ixml=>create( ).
*Cria o objeto com modelo
document_type = ixml_type->create_document( ).
*Cria o cabeçalho encoding="iso-8859-1"
encoding_type = ixml_type->create_encoding( byte_order = 0
character_set = s_encoding_type ).
*Cria o root "DATA_TRANSFER"
element_dtrans_type = document_type->create_simple_element(
name = cc_dt_trans
parent = document_type ).
*Cria o node "METODO_CODIGO" e preenche com um valor passado no L_VALUE
l_value = p_0783.
CONDENSE l_value.
element_dummy_type = document_type->create_simple_element(
name = cc_metodo_cod
value = l_value
parent = element_dtrans_type ).
*Cria o node "XML_IN"
element_xml_in_type = document_type->create_simple_element(
name = cc_xml_in
parent = element_dtrans_type ).
ENDFORM. " yf_inicia_criacao_xml
*& Form yf_dummy_roteiro
text
-->VALUE(P_0996) text
-->VALUE(P_0997) text
FORM yf_dummy_roteiro USING value(p_0996)
value(p_0997).
l_value = p_0996.
CONDENSE l_value.
element_dummy_type = document_type->create_simple_element(
name = p_0997
value = l_value
parent = element_roteiro_type ).
ENDFORM. " yf_dummy_roteiro
*& Form yf_finaliza_xml
text
FORM yf_finaliza_xml.
*Cria o stream factory
streamfactory_type = ixml_type->create_stream_factory( ).
*Conecta a internal table de XML com o stream factory
ostream_type = streamfactory_type->create_ostream_itable( table = gw_xml_table ).
CALL METHOD ostream_type->set_encoding
EXPORTING
encoding = encoding_type.
*Rendering the document
renderer_type = ixml_type->create_renderer( ostream = ostream_type
document = document_type ).
l_rc = renderer_type->render( ).
*Salva o documento XML
l_xml_size = ostream_type->get_num_written_raw( ).
ENDFORM. " yf_finaliza_xml
*& Form yf_exporta_xml
text
-->VALUE(P_0783) text
FORM yf_exporta_xml USING value(p_0783).
CONCATENATE cod_cartaorepom
sy-datum
sy-uzeit
cc_xml
INTO v_nomearquivo.
CONCATENATE p_0783
v_nomearquivo
INTO v_salvaarquivo.
TRANSLATE v_nomearquivo TO UPPER CASE.
*Exporta o XML
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = v_salvaarquivo
filetype = cc_bin
CHANGING
data_tab = gw_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc = 0.
PERFORM yf_sapgui_progress_indicator USING cc_msg_xml_ok.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " yf_exporta_xml
*& Form yf_convert_xml_to_itab
text
-->P_GW_XML_NODE_RET text
-->P_FILENAME text
FORM yf_convert_xml_to_itab TABLES p_gw_xml_node_ret LIKE gw_xml_node
USING p_filename.
DATA l_count.
ixml_type = cl_ixml=>create( ).
Now Create Stream Factory
streamfactory_type = ixml_type->create_stream_factory( ).
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_filename
filetype = cc_bin
IMPORTING
filelength = l_xml_size
CHANGING
data_tab = gw_xml_table2
EXCEPTIONS
OTHERS = 19.
IF sy-subrc = 0.
istream_type = streamfactory_type->create_istream_itable( table = gw_xml_table2
size = l_xml_size ).
document_type = ixml_type->create_document( ).
parser_type = ixml_type->create_parser( stream_factory = streamfactory_type
istream = istream_type
document = document_type ).
IF parser_type->parse( ) NE 0.
IF parser_type->num_errors( ) NE 0.
l_count = parser_type->num_errors( ).
ENDIF.
ENDIF.
CALL METHOD istream_type->close( ).
CLEAR istream_type.
node_type = document_type.
PERFORM yf_get_data USING node_type.
p_gw_xml_node_ret[] = gw_xml_node[].
CLEAR gw_xml_node[].
ENDIF.
ENDFORM. " yf_convert_xml_to_itab
*& Form yf_get_data
text
-->VALUE(X_NODE) text
FORM yf_get_data USING value(x_node) TYPE REF TO if_ixml_node.
DATA: indent TYPE i.
DATA: ptext TYPE REF TO if_ixml_text.
DATA: string TYPE string.
DATA: temp_string(100).
CASE x_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
string = x_node->get_name( ).
w_nodetext = string.
CLEAR string.
string = x_node->get_value( ).
IF NOT w_nodetext IS INITIAL OR
NOT string IS INITIAL.
gs_xml_node-node = w_nodetext.
gs_xml_node-vlnode = string.
IF NOT gs_xml_node-vlnode IS INITIAL.
APPEND gs_xml_node TO gw_xml_node.
CLEAR gs_xml_node.
ENDIF.
ENDIF.
ENDCASE.
Get the next child
x_node = x_node->get_first_child( ).
Recurse
WHILE NOT x_node IS INITIAL.
PERFORM yf_get_data USING x_node.
x_node = x_node->get_next( ).
ENDWHILE.
ENDFORM. "yf_get_data -
Can I unzip the .ipa file and edit the application.xml file
I want to modify the below info to also have an additional string value of 2, which somewhere along the line tells something somewhere that the app can run on the ipad. Is there some info in the compiled application that will error out if I modify this document?
<InfoAdditions>
- <![CDATA[ <key>UIDeviceFamily</key><array><string>1</string></array> ]]>
</InfoAdditions>
into this
<InfoAdditions>
- <![CDATA[ <key>UIDeviceFamily</key><array><string>1</string><string>2</string></array> ]]>
</InfoAdditions>you can change the file extension to zip, unzip it, find the application.xml file in one of the subdirectories, edit it, rezip the files, change the file extension to ipa and install.
-
Parsing .xls(excel) file and creating a .xdat(xml) file out of it
Hi All,
need some tips on a task i am trying accomplish for some days now.
I have a excel file, in which I have 10 columns with 40-50 rows of data.
I have a xml structure in mind, in which I want to put all these data from excel file. But till now I haven't understood exactly how I should go about it step by step.
Should I first parse the excel file and save each row (with the column names) in a list, and then read through each row and insert them in the xml format i have planned?
And how do I open a .xdat data and tell my program to insert the data in the sequence of sets I want them to be saved?
I know it's a pretty newbie question ... but will appreciate any help and tips provided. Would help me a lot to learn this new type of task.
Thank you.
with best regards,
NewbieIf you are using JAXB you unmarshall to read the xml. Then you marshall to write.
So what you do is:
1) Unmarshall your xml document. This means you now have your xml as Java objects.
2) Read through the Java objects using loops, etc making any changes to the values. I think here you want to add values, so you can set your values
3) Now in memory you have your new xml thats been updated, so you can marshall it (save it)
I'd recommend a JAXB tutorial. But the basic steps are:
1) Create an xml file and insure its valid
2) Use a free online utility (http://www.hitsw.com/xml_utilites/) to convert the xml into an xml schema (xsd)
3) Use xjc from the jaxb jar and run it over the xml schema (the command i use is xjc myxmlfile.xsd -p com.example
4) Step 3 above creates all the java classes for you to use so then you can unmarshall. Process. Then marshall
This is just a high level. I might have missed something, but the jaxb tutorial is really good and that's how I learned the process. -
Creating xml file and inert tin to xml file in clob column
i have a table
CREATE TABLE XMLCLOB of XMLType
XMLTYPE store AS CLOB;
now i want to create a xml file by qurying emp table ie select sal,empname from emp.
the cretaed xml file is saved in the xmlclob table how to do that?You will need to use Oracle XML function EXTRACT or EXTRACTVALUE in order to read the data before inserting into Oracle table. These functions need to be used in select statement.
Syntax:
EXTRACT(XMLType_Instance>, <XPath_string>, <namespace_string>)
EXTRACTVALUE(XMLType_Instance>, <XPath_string>, <namespace_string>) -
Using a data file in jsp to generate xml file
hi
can anybody help me to
how to use a data file generated in unix in jsp to generate xml file.
by using beans i am able to generate the xml.
thanks in advance.You haven't provided adequate relevant information. If you need help provide proper relevant details.
-
How to read XML file and write into another XML file
Hi all, I am new to JAVAXML.
My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
I solved, how to read XML file
But I don't know how to Write nodes into another XML.
Can anyone help in this???
Thanks in advance..This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
Dave Patterson -
Pages file is missing its index.xml file?
all the "pages" files which i have created on my computer recently are saying that they have the file is missing its "index.xml"
im freaking out because i have two uni assignemnts due and both files aren't opeing!
help!
i have opened the content of the file.. and all other places are telling me there should be a file called index.zip, in there and to rename it as .pages or to copy off and re open it, or to rename it as zip.xml and try again...
nothing is workingYou have 2 versions of Pages on your Mac.
Pages 5 is in your Applications folder.
Pages '09/'08 is in your Applications/iWork folder.
You are alternately opening the wrong versions.
Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
Pages 5/5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
Pages 5.1 sometimes can not open its own files and you will get the warning that you need a newer version.
Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
Anything that is saved to iCloud is also converted to Pages 5 files.
All Pages files no matter what version and incompatibility have the same extension .pages.
Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
Apple has not only managed to confuse all its users, but also itself.
Note: Apple has removed over 100 features from Pages 5 and added many bugs:
http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
Peter -
Breaking BIG XML files in to 4 different XML Files
Hi:
What will be a problem if I break the BIG XML file in to a number of different XML FILES?
My main reason is to create XMLVIEW.
Please help
ALI_2Would Suite Spot Studios "AA Translator" achieve this? If you navigate to his web site you can test the app by submitting a test project to him and he/they will attempt to "convert" it for you. (Only one of you, you or your buddy, would need to buy and have the app installed).
I realise this is something of a "long shot" since "suitespot" does not use a Mac and this "new" session format (.sesx) may not be readable by his app.
Jeff -
I want to create a parser file which dynamically reads out XML file.
HI ,.
I created a DOM parser where i am getting the values of XML file by tag names...
which is increasing my code lines number ...
So can any one suggest me with proper way of approach to overcome this....HI ...
Here is the code...
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.PrintStream;
import java.lang.Integer;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import sun.java2d.loops.FillPath;
import sun.nio.ch.FileKey;
public class XMLFileParser{
int Size,Height,X,Y,W,H;
String L;
String Path;
boolean resize;
XMLFileParser(){
void Parser(){
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("book.xml"));
// normalize text representation
doc.getDocumentElement ().normalize ();
System.out.println ("Root element of the doc is " +
doc.getDocumentElement().getNodeName());
//first node.
NodeList FrameValues = doc.getElementsByTagName("Frame");
NodeList children=(NodeList)doc.getDocumentElement().getChildNodes();
System.out.println("total of childs are: "+children.getLength());
//for (int j = 0; j < children.getLength(); j++)
// System.out.println(" the childs are: "+children.item(j));
for(int s=0; s<FrameValues.getLength() ; s++){
// System.out.println(FrameValues.getLength());
Node FirstFileNode = FrameValues.item(s);
if(FirstFileNode.getNodeType() == Node.ELEMENT_NODE){
Element frameelements = (Element)FirstFileNode;
NodeList FrameValueList1 = frameelements.getElementsByTagName("setSize");
Element firstAttributeElement = (Element)FrameValueList1.item(0);
NodeList List1 = firstAttributeElement.getChildNodes();
Node node1 = (Node)List1.item(0);
String nodeName1 = node1.getNodeValue();
int value1 = Integer.parseInt(nodeName1);
setSize(value1);
NodeList FrameValueList2 = frameelements.getElementsByTagName("Height");
Element secondAttributeElement = (Element)FrameValueList2.item(0);
NodeList List2 = secondAttributeElement.getChildNodes();
Node node2 = (Node)List2.item(0);
String nodeName2 = node2.getNodeValue();
int value2 = Integer.parseInt(nodeName2);
setHeight(value2);
NodeList FrameValueList3 = frameelements.getElementsByTagName("BoundsX");
Element thirdAttributeElement = (Element)FrameValueList3.item(0);
NodeList List3 = thirdAttributeElement.getChildNodes();
Node node3 = (Node)List3.item(0);
String nodeName3 = node3.getNodeValue();
int value3 = Integer.parseInt(nodeName3);
setBounds(value3);
NodeList FrameValueList4 = frameelements.getElementsByTagName("BoundsY");
Element fourthAttributeElement = (Element)FrameValueList4.item(0);
NodeList List4 = fourthAttributeElement.getChildNodes();
Node node4 = (Node)List4.item(0);
String nodeName4= node4.getNodeValue();
int value4 = Integer.parseInt(nodeName4);
setBounds1(value4);
NodeList FrameValueList5 = frameelements.getElementsByTagName("BoundsW");
Element fifthAttributeElement = (Element)FrameValueList5.item(0);
NodeList List5 = fourthAttributeElement.getChildNodes();
Node node5 = (Node)List5.item(0);
String nodeName5 = node5.getNodeValue();
int value5 = Integer.parseInt(nodeName5);
setBounds2(value5);
NodeList FrameValueList6 = frameelements.getElementsByTagName("BoundsH");
Element sixthAttributeElement = (Element)FrameValueList6.item(0);
NodeList List6 = sixthAttributeElement.getChildNodes();
Node node6 = (Node)List6.item(0);
String nodeName6 = node6.getNodeValue();
int value6 = Integer.parseInt(nodeName6);
setBounds3(value6);
NodeList FrameValueList7 = frameelements.getElementsByTagName("Resize");
Element seventhAttributeElement = (Element)FrameValueList6.item(0);
NodeList List7 = seventhAttributeElement.getChildNodes();
Node node7 = (Node)List7.item(0);
String nodeName7 = node7.getNodeValue();
boolean value7= Boolean.parseBoolean(nodeName7);
setResize(value7);
// second node.
NodeList PanelValues = doc.getElementsByTagName("Panel");
for(int s=0; s<PanelValues.getLength() ; s++){
// System.out.println(FrameValues.getLength());
Node FirstFileNode = PanelValues.item(s);
if(FirstFileNode.getNodeType() == Node.ELEMENT_NODE){
Element Panelelements = (Element)FirstFileNode;
NodeList PanelValueList1 = Panelelements.getElementsByTagName("Layout");
Element firstAttributeElement = (Element)PanelValueList1.item(0);
NodeList List1 = firstAttributeElement.getChildNodes();
Node node1 = (Node)List1.item(0);
String Layout = node1.getNodeValue();
//int value1 = Integer.parseInt(nodeName1);
setLayout(Layout);
NodeList PanelValueList2 = Panelelements.getElementsByTagName("ImagePath");
Element secondAttributeElement = (Element)PanelValueList2.item(0);
NodeList List2 = secondAttributeElement.getChildNodes();
Node node2 = (Node)List1.item(0);
String path = node1.getNodeValue();
//int value1 = Integer.parseInt(nodeName1);
setPath(path);
}//end of if clause
}//end of for loop with s1 var*/
catch (SAXParseException err)
System.out.println ("** Parsing error" + ", line "
+ err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
catch (SAXException e)
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
catch (Throwable t)
t.printStackTrace ();
private void setResize(boolean value7) {
// TODO Auto-generated method stub
resize=value7;
public boolean getResize(){
System.out.println("Resize" + resize);
return resize;
private void setPath(String path) {
// TODO Auto-generated method stub
Path = path;
public String getPath(){
System.out.println("Path" + Path);
return Path;
private void setLayout(String layout) {
// TODO Auto-generated method stub
L=layout;
public String getLayout(){
System.out.println("Layout" + L);
return L;
private void setBounds3(int value6) {
// TODO Auto-generated method stub
H=value6;
System.out.println("setBoundsH" + H);
public int getBounds3(){
System.out.println("getBoundsH" + H);
return H;
private void setBounds2(int value5) {
// TODO Auto-generated method stub
W=value5;
System.out.println("setBoundsW" + W);
public int getBounds2(){
System.out.println("getBoundsW" + W);
return W;
private void setBounds1(int value4) {
// TODO Auto-generated method stub
Y=value4;
System.out.println("setBoundsY" + Y);
public int getBounds1(){
System.out.println("getBoundsY" + Y);
return Y;
public void setBounds(int value3) {
// TODO Auto-generated method stub
X= value3;
System.out.println("setBoundsX" + X);
public int getBounds(){
System.out.println("getBoundsX" + X);
return X ;
public void setHeight(int value2) {
// TODO Auto-generated method stub
Height=value2;
System.out.println("setHeight " + Height);
public int getHeight(){
System.out.println("getHeight " + Height);
return (Height);
setSize(int value1) {
// TODO Auto-generated method stub
Size=value1;
System.out.println("setSize " + Size);
public int getSize() {
System.out.println("getSize " + Size);
return ( Size);
}here i am calling the elements of my xml file each time by tag name ...which is increasing my code lines....so any solution please.... -
I'm very new to spry, after some work time, I have another
question:
If the user create their own xml data (using some spry data
actions) and want to save it to the computer (an xml or txt file),
can spry do this?
Thanks for all your help.Hi,
Please check then note mentioned below.
Note 1227887 - CCMS: Error messages in SM21 and SOAMANAGER (SCS)
Thanks
Rishi Abrol -
APEX File Browser ITEM - select only XML Files
HI ALL,
I have problem with File Browser Item.
How to I use file browser item select only xmlfile (*.xml)?
Edited by: Mahir M. Quluzade on Nov 29, 2010 2:33 PMTry using the attribute<tt>accept</tt> attribute using the item's HTML Form Element Attributes:
accept="text/xml"but note the warnings about poor browser support.
Maybe you are looking for
-
Exception on Windows XP Pro startup.
Greetings, I have been unable to start an AdminServer or a Application Server after installation. -The server.log contains the following messages [09/Jan/2003:16:28:45] INFO ( 492): CORE1116: Sun ONE Application Server 7.0 [09/Jan/2003:16:28:52] INFO
-
Native C++ metod, problem with attributes declared in other meth of Class
Hi guys, I have an interesting question for you. I have a big C++ program, with many classes and methods..., and a java program which uses one of the methods(for the moment!) of a class.I compiled the java program, created a .h file, changed a little
-
My Mac mail if filling new emails with past content?
To All Users, I am running on MAX OS X v10.6 Snow Leopard. Since yesterday some of the new email's in my Mac Mail client are getting filled with content that is one year old. This problem does not exist with the same emails that are also do
-
Access connection to get to Music Store.... not working
I have Internet connectivity, yet when I try to activate the music store it tells me I don't have an active Internet connection. Was never problem before. Please advise how to rectify. I have a Dell Insperion 6000 running Windows XP. Thanks in advanc
-
<h3>Other forums</h3> <li>Employee self service questions (ESS): SAP ERP HCM Employee Self-Service> <li>Manager self service questions (MSS): SAP ERP Human Capital Management (SAP ERP HCM)> <li>Guided Procedure (GP) questions: SAP Business Process Ma