How to write program to make document well formed?
hi All,
I want to make the document well formed if it's not...
Like if any tag is missing in the document that should be added programmatically.And the tags are generalized not hardcoded...
Will u plz give me any idea for that....
Plz help me.
Thanks in advance
There are two problems with this, and both are close to show-stoppers.
1) What you showed is sloppy html. I'm not aware of any HTML parsers like are available for XML. If you use an XML parser, either DOM or SAX, you will stop with the first mismatched element. Once an XML parser recognizes the document is badly-formed, it stops. It might generate millions of phantom problems due to one missing element.
2) Even if you could find that in your document stub there is a <para> element missing, so what. Where do you programmatically put the opening element? You would need to know a lot about what is allowed where to find the best place for it so it does the least damage to other elements.
Dave Patterson
Similar Messages
-
How to write program for handling script ?
In script i have 2 pages.
In first page i have constant windows and variable windows.
In second page i have main window.
How to write program for this?Hi
You need to write a driver program. You need to use open form, then write_form to write data into various windows and then close_form to close.
As you don't want main window in the first page first try out just by having the window in the second page; i guess system will take care of it. As all other windows filled and if u start writing data in the main it'll go for next page.
If doesn't work have the window on the first page with the least hight and write a command
IF &SYST-PAGE& EQ 1
NEXT-PAGE.
ENDIF.
Then in the second page you can have the main window hight as per your requirement.
Here is an example
(1) Get customer data
TABLES: scustom, sbook, spfli.
DATA: bookings like sbook...
select * from...
(2) Open form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
FORM = 'S_EXAMPLE_1'
DIALOG = 'X'
EXCEPTIONS
others = 1
(3) Print table heading
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADING'
TYPE = 'TOP'
WINDOW = 'MAIN'
FUNCTION = 'SET'
(4) Print customer bookings
LOOP AT bookings WHERE
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BOOKING'
TYPE = 'BODY'
WINDOW = 'MAIN'
ENDLOOP
(5) Close form
CALL FUNCTION 'CLOSE_FORM'
Regards
Surya. -
How to write database validations in Adobe flex form for web Dynpro
Hi,
Can any one help me
How to write database validations in Adobe flex form for web Dynpro
Please provide some documents if u have
Thanks in advance
D babuHi Thomas Jung ,
Thanx for reply.
I will explain my requirement
I have vendor field in flex if i enter vendor no in flex I am biding this field to web dynpro context field I am getting this value in dynpro .
With this value I am checking in my SAP database if i donu2019t get I have to through an error in flex .
Please tell me how to through an error to flex. -
How do i open a PDF document in forms?
How do i open a PDF document in forms runtime?
acrobat reader would already be installed on the pc's.
any help would appreciated.
Thanks
Hussein SaigerHello,
I'm not a specialist, but I think that you could configure these information in the /Apache/Apache/conf/httpd.conf file
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
<IfModule mod_alias.c>
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/"..
Alias /icons/ "/appli/9IAS/Apache/Apache/icons/"
Alias /jservdocs/ "/appli/9IAS/Apache/Jserv/docs/"
Alias /javacachedocs/ "/appli/9IAS/javacache/javadoc/"
...Francois -
How to write program to list the system directory(content of pc)
how to write a program that will display all the folder n directory of the pc like:
+My Computer
+c:
+d:Copy this line and save it in a file named "dirlist.bat":
for %%* in (%1) do dir /b %2 %1To use it, change to the directory it's in and at the command prompt type
dirlist directory [/s] directory is the name of the directory that you want listed.
/s is optional and will list the contents of all subdirectories also.
(You didn't say it had to be Java - use the right tool for the job) -
I need help on how to write program that read integers
I am a beginner to java and need you help please.
How do I write a program that will read an unspecified number of integers (between 5 to 8 values) and :
(a) determine how many positive and negative value have been read.
(b) find the average of the positive integers as well as the average for the negative integers.
(c) find the total of all values. (both positive and negative)
(d) count the number of zero input by the user and display the count.
(e) your program should allow the users to repeat the task as many times as they want.
Generate a table like this: (assuming that the user enters: 2,0,-11,21,0,-3,89,6)
Positive Ave(+) Negative Average(-) Zero(0) **************************************************************
2 39 -3 -7 2
21 -11
89
6I'm sure thats ur programming assignment.... Read any intro to java book .... or search on the net and you will be able to find answers
-
How to write 'into' a PDF-document ?
hi there,
i have a new small project to do with the following problem:
i get a file (text-file) with invoices from an external system.
I want to 'overlay' this file with a form, which is a PDF-document.
the question is: is it possible to write 'into the PDF'-form the contents of the text-file ? if yes, how is it possible ?
regards, Martinwell,
this is not what i need, sorry
i don't want to convert the text-file into a PDF-file.
i have an existing PDF-file (a FORM with all the overlay, like graphics, company-logo, etc....). and i have a text file. and i want to 'merge' the text into
the pdf-file.
regards, Martin -
How to write program for the long text in EMIGALL for the DEVICE LOCATION.
Hi,
I am pretty new to this ISU field and i have been asked to code for a Long Text in EMIGALL for DEVICE LOCATION,
so i would like someone can help me with it.
thanks in advance.
Robert.Robert,
You can find most of the answers to your questions in the Guidelines:
Chapter 2.4.2 describes how to configure the field rule Fixed Value.
Chapter 2.4.5 describes how to configure the field rule via KSM.
Chapter 2.5 descibes the Key- and Status Management and the usage of the the KSM in field rules.
The specific answer to your questions are:
(1) ...When i was adding the fixed rule, it was asking for domain so what should be the Domain that i should add ... You may ignore the domain field when creating a fixed value object. It's more for information purposes.
(2) ... and what should i keep the fixed value, string or filed or abap rule ... I'd suggest to use 'String' and enter the specific value in the field 'FV contents'.
(3) ... Finally you need to adjust the RETURN-FIELD of the newly created BAPI migration object to AUTO-X_HEAD-TDNAME, where do i make this adjustment can you specify that ... The return field can only be adjusted int the migration object maintenance screen (MigObject -> Change). Please see chapter 3.1 for more details on the 'return field' and figure 3-8 in chapter 3.4.2 how to generate a BAPI migration object.
(4) ... Well i would also like to ask about the x_head-tdname = via KSM (e.g. DEVLOC), where should i put the value ... You wanted to know how to migrate a long text of a device location migration object DEVLOC). According to chapter Chapter 2.4.5 you need to enter the name of the superior migration object (here DEVLOC) in the 'MigObject1'field on the 'via KSM' sub-screen on the field maintenance screen.
(5) ... and what exactly would it be can i put DEVLOC in the ID of technical Object and where should i put this value... I am not sure I understand your question. In the end you will need to pass the number (ID) of the technical object in the TDNAME field. Either you put the id into the import file (only if you know the id) or you need to use the 'via KSM' field rule to replace the legacy system key of the device location by the SAP key by the load report and prior to passing the auto data to the application thus your new function module.
Kind regards,
Fritz -
BAPI_PO_GETDETAIL1 how to write program
Hi gurus ,
Please help me with the detail code to call a BAPI to dispaly PURCHSA ORDER details.
i have to use BAPI_PO_GETDETAIL1.
how to do the coding??????Hi,
Welcome To SDN!!
Try this out...
Report ZBapi .
data: po_items type table of bapiekpo with header line.
parameters: p_ebeln type ekko-ebeln.
call function 'BAPI_PO_GETDETAIL'
exporting
purchaseorder = p_ebeln
ITEMS = 'X'
ACCOUNT_ASSIGNMENT = ' '
SCHEDULES = ' '
HISTORY = ' '
ITEM_TEXTS = ' '
HEADER_TEXTS = ' '
SERVICES = ' '
CONFIRMATIONS = ' '
SERVICE_TEXTS = ' '
EXTENSIONS = ' '
IMPORTING
PO_HEADER =
PO_ADDRESS =
tables
PO_HEADER_TEXTS =
po_items = po_items
PO_ITEM_ACCOUNT_ASSIGNMENT =
PO_ITEM_SCHEDULES =
PO_ITEM_CONFIRMATIONS =
PO_ITEM_TEXTS =
PO_ITEM_HISTORY =
PO_ITEM_HISTORY_TOTALS =
PO_ITEM_LIMITS =
PO_ITEM_CONTRACT_LIMITS =
PO_ITEM_SERVICES =
PO_ITEM_SRV_ACCASS_VALUES =
RETURN =
PO_SERVICES_TEXTS =
EXTENSIONOUT =
check sy-subrc = 0.
loop at po_items.
write:/ po_items.
endloop.
Refer
http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1
Regards
Kiran SURE -
How to write programs for selfdeveloped message based instruments?
I developed a message based interface by myself, but I have no experience of developing instrument drivers with Labwindow/CVI. I want to know which commands will be sent to the instruments when power up? It's very strange that when I plug in my instrument, the light of Access of resource mamager keep on lighted and the HP-VISA Assistant can't recoganize all the instruments in the mainfram. I want to know how to let my instrument be recoganized by system. Thank you very much!
What is the VXI controller for your system? What VXI driver is running on the system? You mention HP-VISA, is your VXI controller and driver from HP or Agilent? If so, you will need to contact them on how to get your instrument recognized and working in the system.
To write your instrument driver, I would recommend using VISA commands. Message based instruments have sets of specific commands that they respond to. Generally, one would have to look in the documentation for that instrument to determine the instruments commands. -
I want to how to write program to design for archived data?
Hi,
In my project already some z reports are there. Now some old data is archiving from the tables.
I want read the data for the z reports . i used below code to read the data by passing the archive document key to read the data.
But the below code is reading entire data due to that it is taking lot of time.
Please give some suggestions weather am i gong in right way or not?.
LOOP AT it_arcindx1 INTO wa_arcindx1.
v_key = wa_arcindx1-archivekey+0(6).
CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
EXPORTING
archive_document = v_key
object = 'MM_EKKO'
IMPORTING
archive_handle = lv_handle
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
DO.
CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT'
EXPORTING
archive_handle = lv_handle
EXCEPTIONS
end_of_file = 1. "nur die Ausnahmen, auf die man
IF sy-subrc <> 0. "wirklich reagieren will
EXIT.
ENDIF.
CALL FUNCTION 'ARCHIVE_GET_TABLE'
EXPORTING
archive_handle = lv_handle
record_structure = 'EKBE'
all_records_of_object = 'X'
TABLES
table = git_ekbe_temp
EXCEPTIONS
end_of_object = 0.
LOOP AT git_ekbe_temp ASSIGNING <ls_ekbe>
WHERE mandt = sy-mandt
AND vgabe = '8'
AND budat IN s_budat.
MOVE-CORRESPONDING <ls_ekbe> TO waa_table1.
APPEND waa_table1 TO it_table1.
ENDLOOP.
ENDDO.
CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
EXPORTING
archive_handle = lv_handle.
CLEAR wa_arcindx1.
ENDLOOP.
Regards,
Maruthi SHi Maruthi,
Try using 'ARCHIVE_GET_NEXT_RECORD' instead of 'ARCHIVE_GET_TABLE' using which you can maintain no. of records hit by the handle.
Have a look at sample logic given in SCN.
http://scn.sap.com/thread/1263660
Hope this helps.
Regards,
Naveen -
How do I convert my pdf documents into forms which I can edit with adobe exportpdf?
I just purchased the Adobe ExportPDF and need to know how to convert my pdf or other files into documents that I can edit. Can someone help me with this?
Hi Desh,
There is no way you can edit and document with Exportpdf. Exportpdf only helps you to convert the pdf document to other formats.
Please provide more information what is exactly that you want to perform. And what all Adobe Applications you have. -
XSLT and non-well formed XML file
All,
I am getting some "XML" feeds from some old lab equipment, however the XML isn't well formed. Really it isn't even XML it is just a formatted text file. So I will get a feed like the following:
<SampleSet Label="Sample Set">
<Name Label="Name" Value="CQS6" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:20 PM" />
<CarbonAvg Label="Carbon Avg." Value="116 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="2015002301 1" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 11:46 AM" />
<CarbonAvg Label="Carbon Avg." Value="43.5 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="2015002302 2" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 11:53 AM" />
<CarbonAvg Label="Carbon Avg." Value="44.4 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="2015002303 3" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:00 PM" />
<CarbonAvg Label="Carbon Avg." Value="42.6 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="2015002322 1" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:07 PM" />
<CarbonAvg Label="Carbon Avg." Value="32.3 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="2015002323 2" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:14 PM" />
<CarbonAvg Label="Carbon Avg." Value="35.8 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="2015002324 3" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:27 PM" />
<CarbonAvg Label="Carbon Avg." Value="32.4 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="CQS6" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:33 PM" />
<CarbonAvg Label="Carbon Avg." Value="123 ppm" />
</SampleSet>
As you can see, this isn't well formed and when I try to process this via XSLT I run into all kinds of problems. So outside of writting a program to watch for files, picking them up with a c# program, wrapping the XML to make it well formed then pass
it to the XSLT file, is there a way that I can wrap the file using XSLT instead of having to create a separate program to make it well formed? Any help is appreciated.Hello katghoti,
>>however the XML isn't well formed. Really it isn't even XML it is just a formatted text file
Firstly, we should know that a text file actually does not know a XML format, so I suggest that you could save the text file to a XML file. And if you provided XML is the whole content, it is not an invalid XML file because the XML document must have one
and only one root element. You have to add root element, so a valid XML file with these SampleSet elements should be similar with below:
<?xml version="1.0"?>
<SampleSets>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="CQS6" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:20 PM" />
<CarbonAvg Label="Carbon Avg." Value="116 ppm" />
</SampleSet>
<SampleSet Label="Sample Set">
<Name Label="Name" Value="CQS6" />
<AnalysisDate Label="Analysis Date" Value="3/13/2015 12:33 PM" />
<CarbonAvg Label="Carbon Avg." Value="123 ppm" />
</SampleSet>
</SampleSets>
I am not sure how you want the XML be formatted, my usual approach to format a XML file is to open the file in Visual Studio and use ctrl K+D keyboard shortcuts to format the XML file.
>>is there a way that I can wrap the file using XSLT instead of having to create a separate program to make it well formed?
XSLT is used to process XML file, while you provided file is a text file, it does not recognize it.
If I misunderstand, please feel free to let me know.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
In Adobe Forms where to write to write Program lines
Hi All,
In Adobe Interactive Forms , in SFP transaction where do we write Program lines.
In smar forms , roight clik flow logic and program lines creates an area for program line, what is the euqualiant to this in adobe forms.
Please help me out on this.
Thanks,
PraveenHi,
Please check the following links,
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d4fe7fca-0b01-0010-569a-9a9c1ddf4132
https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/7c3bc67e-0c01-0010-dbb3-908315896909 [original link is broken] [original link is broken]
https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/7c3bc67e-0c01-0010-dbb3-908315896909 [original link is broken] [original link is broken]
/people/vani.krishnamoorthy/blog/2006/05/17/fillable-adobe-forms-using-abap -
Not well formed XML data in XI
HELLO !!
Can XI handle a non welll formed XMl messages as an input ?
THANKS
~PeeruHey
>>we can use java mapping to make it well formed XMl.
What exactly you mean by "not well formed XML" ?
>>Does it mean that java mapping can take the value as a stream of data and then at the next step the XML parser is va;idating the msg ?
Yeah thats the way Java mapping works,it takes input in the form of Input stream and gives output as an output stream.
Bottom line is XML structure should be valid,you can't handle a invalid XML structure with any mapping,once you get the message then you can use graphical message mapping for simple structures or use Java for complex ones(i guess by non-well formed you mean the ones which can be handled only by Java mapping)
Thanx
Aamir
Maybe you are looking for
-
Does the Ipod nano 5th gen. work with the built in microphone on Skullcandy headphones?
I want to buy a pair of Skullcandys with a microphone in them, but it wouldnt make sense to pay the extra money for a microphone if my iPod wont work with it. Has anyone ever tried it or know if the headphones would be compatible with the iPod
-
When I put in my new serial number I get a red cross
When I put in my new serial number (after approval from adobe) I get a red cross
-
Hi i can't seem to write on a blank or any saved document??
hi i cant write on a blank or saved document?
-
Windows 10 Technical Preview product key not working
When I try to enter the product key "NKJFK-GPHP7-G8C3J-P6JXR-HQRJR" (from http://windows.microsoft.com/en-au/windows/preview-iso) on Windows 10 Technical Preview build 9926, I get the message "That key can't be used to activate this edition of Window
-
Anyone had success rolling out non-Cisco WGBs with H-REAP? My customer is using WLC 5508 with code 7.0.116.0. As per WLC config guide ( http://goo.gl/6kX0d ), Cisco has tested multiple third-party devices for compatibility. Is it possible to get that