10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have input file as XML. following are input data
#complex.xml
Code:
<?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: arun_kohan
1 Replies
2. Shell Programming and Scripting
Hi evry1,
This is my 1st post in this forum.Pls help me
I want to extract some data froma xml file which has 2000 lines using shell scripting. Actually my xml file has some "audio and video codes" which i need to arrange in a column wise format after extracting it using shell scripting.I... (4 Replies)
Discussion started by: arun_kohan
4 Replies
3. Shell Programming and Scripting
Hello,
I want to know which shell scripting language (like AWk, Perl or any other) is the best for parsing and editing
1) space or Comma Separated Datsets
2) XML type Datasets. (1 Reply)
Discussion started by: ajayram
1 Replies
4. Shell Programming and Scripting
Hi Anybody can help me to make a script that replace string "Su saldo es" with "Your balance" in XML block if it start with Text Id=98 and Text Id= 12 only sample of part of file below
<Text Id="98">
<Language id="1">Su saldo es $mainAccountBalance1Tiene ademas $dedicatedAccount1Balance1... (13 Replies)
Discussion started by: Ashu_099
13 Replies
5. Shell Programming and Scripting
HI Guys,
I have to parse below xml file :-
<xn:SubNetwork id="ONRM_ROOT_MO_R">
<xn:MeContext id="LP101">
<xn:ManagedElement id="1">
<xn:VsDataContainer id="1">
<xn:attributes>
... (8 Replies)
Discussion started by: asavaliya
8 Replies
6. UNIX for Dummies Questions & Answers
find pattern, delete line with pattern and 3 lines above and 8 lines below the pattern. The pattern is "isup". The entire record with starting tag <record> and ending tag </record> containing the pattern is to be deleted and the rest to be retained.
<record>
... (4 Replies)
Discussion started by: sdesstp
4 Replies
7. Solaris
Hi,
I want to parse an XML File using Shell Script preferably by using awk command,
I/P file is :
<gn:ExternalGsmCell id="016P3A">
<gn:attributes>
<gn:mnc>410</gn:mnc>
<gn:mcc>310</gn:mcc>
<gn:lac>8016</gn:lac>
... (2 Replies)
Discussion started by: tech_frk
2 Replies
8. Shell Programming and Scripting
Hi folks,
Need some help with XML to text file parsing , the following is the content of the XML File.
<xn:SubNetwork id="SNJNPRZDCR0R03">
<xn:MeContext id="PRSJU0005">
<xn:VsDataContainer id="PRSJU0005">
<xn:attributes>
... (6 Replies)
Discussion started by: tech_frk
6 Replies
9. Shell Programming and Scripting
Hello,
I don't have experience in this scripting and I need some help to read a value from an XML file and change it with a random number to use in simulator for different network scenarios.
</Description><sim_comm_rounds>35</sim_comm_rounds><num_clusters>1</num_clusters><Clocking>
I want to... (5 Replies)
Discussion started by: erhanasd
5 Replies
10. Shell Programming and Scripting
CPAN provide xml::simple module which can be used to generate XML files.
can i use this module in shell scripting? how? plzz give me an example to generate xml file using this module . you can also use some other module..
BUT SHELL SCRIPTING SHOULD ONLY BE USED (4 Replies)
Discussion started by: cynosure2009
4 Replies
xmerl_xsd(3erl) Erlang Module Definition xmerl_xsd(3erl)
NAME
xmerl_xsd - Interface module for XML Schema vlidation.
DESCRIPTION
Interface module for XML Schema vlidation. It handles the W3.org specifications of XML Schema second edition 28 october 2004. For an intro-
duction to XML Schema study part 0. An XML structure is validated by xmerl_xsd:validate/[2,3].
DATA TYPES
global_state() :
The global state of the validator. It is representated by the #xsd_state{} record.
option_list() :
Options allow to customize the behaviour of the validation.
Possible options are :
{tab2file,boolean()} :
Enables saving of abstract structure on file for debugging purpose.
{xsdbase,filename()} :
XSD Base directory.
{fetch_fun,FetchFun} :
Call back function to fetch an external resource.
{fetch_path,PathList} :
PathList is a list of directories to search when fetching files. If the file in question is not in the fetch_path, the URI will be
used as a file name.
{state,State} :
It is possible by this option to provide a state with process information from an earlier validation.
EXPORTS
file2state(FileName) -> {ok, State} | {error, Reason}
Types State = global_state()
FileName = filename()
Reads the schema state with all information of the processed schema from a file created with state2file/[1,2] . The format of this
file is internal. The state can then be used validating an XML document.
format_error(L::Errors) -> Result
Types Errors = error_tuple() | [error_tuple()]
Result = string() | [string()]
Formats error descriptions to human readable strings.
process_schema(Schema) -> Result
Equivalent to process_schema(Schema, []) .
process_schema(Schema, Options) -> term()
process_schemas(Schemas) -> Result
Equivalent to process_schema(Schemas, []) .
process_schemas(Schemas, Options) -> term()
process_validate(Schema, Xml::Element) -> Result
Equivalent to process_validate(Schema, Xml, []) .
process_validate(Schema, Xml, Opts) -> term()
state2file(S::State) -> ok | {error, Reason}
Same as state2file(State,SchemaName)
The name of the saved file is the same as the name of the schema, but with .xss extension.
state2file(S::State, FileName) -> ok | {error, Reason}
Types State = global_state()
FileName = filename()
Saves the schema state with all information of the processed schema in a file. You can provide the file name for the saved state.
FileName is saved with the .xss extension added.
validate(Xml::Element, State) -> Result
Equivalent to validate(Element, State, []) .
validate(Xml::Element, State, Opts::Options) -> Result
Types Element = XmlElement
Options = option_list()
Result = {ValidElement, global_state()} | {error, Reasons}
ValidElement = XmlElement
State = global_state()
Reasons = [ErrorReason] | ErrorReason
Validates a parsed well-formed XML element (Element).
A call to validate/2 or validate/3 must provide a well formed parsed XML element #xmlElement{} and a State, global_state() , which
holds necessary information from an already processed schema. Thus validate enables reuse of the schema information and therefore if
one shall validate several times towards the same schema it reduces time consumption.
The result, ValidElement, is the valid element that conforms to the post-schema-validation infoset. When the validator finds an
error it tries to continue and reports a list of all errors found. In those cases an unexpected error is found it may cause a single
error reason.
Usage example:
1>{E,_} = xmerl_scan:file("my_XML_document.xml").
2>{ok,S} = xmerl_xsd:process_schema("my_XML_Schema.xsd").
3>{E2,_} = xmerl_xsd:validate(E,S).
Observe that E2 may differ from E if for instance there are default values defined in my_XML_Schema.xsd .
AUTHORS
<>
xmerl 1.2.8 xmerl_xsd(3erl)