CN107506431A - By method, storage medium and the terminal of XML file generation html file - Google Patents

By method, storage medium and the terminal of XML file generation html file Download PDF

Info

Publication number
CN107506431A
CN107506431A CN201710722695.8A CN201710722695A CN107506431A CN 107506431 A CN107506431 A CN 107506431A CN 201710722695 A CN201710722695 A CN 201710722695A CN 107506431 A CN107506431 A CN 107506431A
Authority
CN
China
Prior art keywords
node
html
file
text
xml file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710722695.8A
Other languages
Chinese (zh)
Inventor
赖顺洋
徐正财
丁新民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Skyworth Group Intelligent Equipment Co Ltd
Original Assignee
Guangzhou Skyworth Flat Display Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Skyworth Flat Display Technology Co Ltd filed Critical Guangzhou Skyworth Flat Display Technology Co Ltd
Priority to CN201710722695.8A priority Critical patent/CN107506431A/en
Publication of CN107506431A publication Critical patent/CN107506431A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention discloses a kind of method, storage medium and terminal that html file is generated by XML file, and its method includes step:The page root node of XML file, region unit node, media information node, content node and text message node are defined respectively, generate the Regional Distribution of XML file;Corresponding text, picture or video are configured to XML file according to the Regional Distribution, generate new XML file;Dissection process is carried out to new XML file, the text after parsing, picture and video are converted into HTML nodal informations, generate html file.The present invention solves the problems, such as that XML format content directly can not be shown on the page in the prior art.

Description

By method, storage medium and the terminal of XML file generation html file
Technical field
Html file is generated the present invention relates to the display field of digital signage ad content, more particularly to by XML file Method, storage medium and terminal.
Background technology
In digital signage advertisement field, it is necessary to which copy, picture, video content are integrated in the same page public Region shows beholder by display screen, and so as to reach advertising effect, but its content being laid out can not be entered again Edlin and change.
XML is a kind of standard language that W3C is defined, and has scalability, platform independence and supports internationalization and ground The characteristics of area, it can be used to store text, picture, video display content and display attribute information, but XML format content is not easy Content is shown on the page, so need to be converted to html format file shows text, picture, in video in cross platform system Hold.
Therefore, prior art has yet to be improved and developed.
The content of the invention
In view of above-mentioned the deficiencies in the prior art, it is an object of the invention to provide the side that html file is generated by XML file Method, storage medium and terminal, it is intended to solve the problems, such as that XML format content directly can not be shown on the page in the prior art.
Technical scheme is as follows:
A kind of method that html file is generated by XML file, wherein, including step:
Respectively to the page root node of XML file, region unit node, media information node, content node and text message node It is defined, generates the Regional Distribution of XML file;
Corresponding text, picture or video are configured to XML file according to the Regional Distribution, generate new XML file;
Dissection process is carried out to new XML file, the text after parsing, picture and video are converted into HTML nodal informations, it is raw Into html file.
The described method that html file is generated by XML file, wherein, the region unit node is the son of page root node Node, the media information node are the child node of region unit node, and content node and the text message node is media The child node of information node.
The described method that html file is generated by XML file, wherein, the attribute information that the page root node includes is The page is wide, the page is high and page layout background color and page layout background picture path;The attribute information that the region unit node includes is area Domain block is wide, region unit facing pages left side deviation post X and region unit facing pages top margin deviation post Y with and region block identification ID;The attribute information that the media information node includes is media Display Category, display duration and media information ID;The content Node includes the path node information of picture and video, and the attribute information that text message node includes is word size, word shows The color and text word content shown.
The described method that html file is generated by XML file, wherein, it is described that dissection process is carried out to new XML file, Text after parsing, picture and video are converted into HTML nodal informations, generation html file specifically includes:
The page root node information of XML file is parsed, obtains HTML's<body>Element;Under page root node All areas block node parsed, obtain corresponding HTML's<div>Region unit;To all matchmakers under region unit node Body information node is parsed, and is obtained corresponding HTML element, is ultimately produced html file.
The described method that html file is generated by XML file, wherein, all media under region unit node Information node is parsed, and is obtained corresponding HTML element, is specifically included:Media information node is parsed, extracts media Information type, and judge media information type, when media information type is picture, create HTML's<img>Element, according to matchmaker Body information node attribute is set<img>Attribute of an element simultaneously sets picture path;When media information type is video, create HTML's<video>Element, set according to media information nodal community<video>Attribute of an element simultaneously sets video path;When When media information type is text, create HTML's<div>Element, while set according to media information nodal community<div>Member The attribute of element.
The described method that html file is generated by XML file, wherein, when the media information type is text, also Including:<div>Region unit creates daughter element<span>, set<span>Color, the size of element parse for text node Text color, word size, set<span>The content of element is the text word content that text node parses.
The described method that html file is generated by XML file, wherein, in addition to:Html file head add css and Js files are quoted.
A kind of storage medium, a plurality of instruction is stored thereon with, wherein, the instruction is adapted to be loaded and performed such as by processor The upper described method that html file is generated by XML file.
A kind of terminal, it is characterised in that including:
Processor, it is adapted for carrying out each instruction;And
Storage medium, suitable for storing a plurality of instruction, the instruction is adapted to be loaded by processor and performed as described above by XML texts The method that part generates html file.
Beneficial effect:Regional Distribution of the invention by pre-defining the XML format for being easy to be converted into html format, according to Regional Distribution's storage text, picture, the display content of video and the attribute, and then it is rapidly converted into HTML when needing display Formatted file, to show text, picture, video content in cross platform system.Solve in the prior art XML format content without Method on the page directly show the problem of.
Brief description of the drawings
Fig. 1 is the flow chart of the method preferred embodiment of the present invention that html file is generated by XML file.
Fig. 2 is the preferred embodiment structured flowchart of terminal of the present invention.
Embodiment
The present invention provides a kind of method, storage medium and terminal that html file is generated by XML file, to make the present invention's Purpose, technical scheme and effect are clearer, clear and definite, and the present invention is described in more detail below.It should be appreciated that this place is retouched The specific embodiment stated only to explain the present invention, is not intended to limit the present invention.
A kind of method that html file is generated by XML file, as shown in figure 1, including step:
S1, respectively to the page root node of XML file, region unit node, media information node, content node and text message section Point is defined, and generates the Regional Distribution of XML file;
S2, corresponding text, picture or video configured to XML file according to the Regional Distribution, generate new XML file;
S3, dissection process is carried out to new XML file, the text after parsing, picture and video is converted into HTML nodal informations, Generate html file.
Regional Distribution of the invention by pre-defining the XML file for being easy to be converted into html format, according to the region Layout storage text, picture, the display content of video and attribute, the XML file of generation can when needing display rapid conversion For html format file, to show text, picture, video content in cross platform system.
Specifically, the step S1 includes:
S11, definition XML file page root node, page root node are attribute letters unique, that the page root node includes Cease for the page is wide, the page is high and page layout background color and page layout background picture path;
S12, XML file of giving a definition in the page root node region unit node, namely region unit node is page root node Child node, the attribute information that the region unit node includes is that region unit is wide, region unit facing pages left side deviation post X (That is left side distance value)With region unit facing pages top margin deviation post Y(That is top margin distance value)With and region block identification ID;
S13, XML file of giving a definition in the region unit node media information node, namely media information node is region unit The child node of node, the attribute information that the media information node includes are media Display Category, display duration and media information ID, media Display Category include text, picture, video.
S14, XML file of giving a definition in the media information node content node and text message node, namely it is described Content node and text message node are the child node of media information node, and content node includes the path section of picture and video Point information, the attribute information that text message node includes are word size, the color of text importing and text word content, are formed The Regional Distribution of XML format.
In the step S2, according to Regional Distribution's configuration text, picture or the video of the XML format defined in step S1, Can forming region layout XML file, it is clear that Regional Distribution's XML file still maintain XML format file be easy to increase number According to, delete data and modification data the characteristics of;
The step S3 is specifically included:
S31, parsing page root node information, including the width of the page, height, background colour, background picture path, and it is converted into HTML 's<body>Element, page root node is wide, high, background colour is accordingly converted into<body>Width, height, the background colour of element, for the back of the body Scape picture path, one HTML's of establishment<img>Element,<img>Attribute src value be exactly this picture path,<img>Width High attribute is exactly the wide and high of page root node;
All areas block node under S32, parsing page root node, its child node matchmaker is parsed for regional block node Body information node forms one group of media information node linked list, one by one the mark ID of parsing extraction region unit, width, height, left side distance Value, top margin distance value, while establish corresponding HTML's for regional block<div>Region unit, and this is assigned respectively<div>Area The attribute of domain block such as id, width, height, margin-left, margin-top are the ID of respective regions block, width, height, the left side Distance value, top margin distance value;
S33, parsing XML media information nodes, with<div>Corresponding HTML element is created in region unit, realizes generation HTML File, specifically, extraction media information ID, media information type, media information playing duration, created according to media information type Corresponding HTML media information elements:When media information type is picture, parsing extraction media information node word node content section Point, picture resource path is parsed from its content node, and create HTML's<img>Element, assigning respectively should<img>Element Attribute id, type, duration, src are media information ID, media information type, media information playing duration, picture resource road Footpath;When media information type is video, parsing extraction media information node byte point content node, parsed from its content node Video resource path, and create HTML's<video>Element, and assign being somebody's turn to do respectively<video>Attribute of an element id, type, Duration, src are media information ID, media information type, media information playing duration, video resource path;Media information When type is text, the text child node of parsing extraction media information node, it is big to parse extraction word from corresponding text child node Small, text color and text word content, and create HTML's<div>Element, assigning respectively should<div>Attribute of an element id, Type, duration are media information ID, text, media information playing duration, while at this<div>Element creates daughter element< span>, setting respectively should<span>Style Style Attributes color, font-size of element are Regional Distribution XML Chinese this section The text color parsed, word size are put, setting should<span>The content of element is the text word that XML text nodes parse String content.The media information HTML element of this conversion is added as corresponding HTML region units<div>The child node element solution of element Each media information node is analysed,<div>Corresponding HTML element is created in region unit, realizes generation html file.
S34, to all areas block HTML element<div>The class values that set a property are region, and configure following CSS To css files
.region {
position: absolute;
overflow: hidden;
}
The class values that set a property to all media information HTML elements are media, and configure CSS to css files
.media{
opacity: 0;
position: absolute;
width: 100%;
height: 100%;
}
S35, according to step S33, S34, the Regional Distribution's XML file configured to definition completely changes out html file, and draws Enter js files and realize that, to the element circular traversal that class is media, the duration playing durations according to corresponding element calculate, Meet the currently playing period, it is dispaly state to set the HTML element, the child node element under other the same area block nodes Hidden state is arranged to, so as to reach to media information HTML element display control.Unified output html file, css files, js File is so achieved that XML file is changed to html page, and realize advertising programme content and lead to same catalogue file Html page is crossed to play displaying function.
It is following by more detailed embodiment, the present invention will be further described.
The first step:Define XML Regional Distribution
1.1st, defining the unique root node of xml page layouts is<layout>,
<layout>Example:
<layout width="800" height="450" bgcolor="#000000" background="bg.GIF">
< Region />
</layout>
Wherein,<layout>Associated description is as shown in table 1:
Table 1
Keyword Description Value Types
width The width of the global page Numeral
height The height of the global page Numeral
bgcolor Global page layout background color Color value
background Global page layout background picture Picture path
< Region /> <layout>Daughter element Xml node elements
1.2nd, definitions example xml region units node is<region>,
<region>Example:
<region id="58c258333510c" width="232" height="142" top="193" left="61">
<media/ >
</region>
<region>Associated description is as shown in table 2 below:
Table 2
Keyword Description Value Types
id Region unit ID Character string
width The width of region unit Numeral
height The height of region unit Numeral
top Opposite crests position Numeral
left Opposing left position Numeral
<media/> <region>Daughter element Xml node elements
1.3rd, defining xml media information nodes is<media>;
Defining xml content nodes is< content >;
Defining xml text nodes is<text>.
<media>Example:
<media id="62" type="image" duration="2">
<content>
<uri>62.jpg</uri>
</ content >
</media>
<media id="e873f9d414f42d95a718a459fa782d11" type="text" duration="8">
< content >
<direction>right</direction>
<scrollSpeed>3</scrollSpeed>
</ content >
<text font-size="36" color=”#ff0000”>a sample</text>
</media>
Wherein,<media>Associated description is as shown in table 3.
Table 3
Keyword Description Value Types
id ID Character string
type Classification Image/video/text
duration Playing duration Numeral
<content /> <media>Daughter element Xml node elements
<uri> Picture or video file path Xml node elements
<direction> Text rotating direction Xml node elements
<text/> <media>Daughter element Xml node elements
font-size Word size Numeral
color Textcolor Color value
Second step:Configuration xml layouts are defined by first step
Example is as follows:
<xml version="1.0">
<layout width="800" height="450" bgcolor="#000000" background="60.GIF">
<region id="58c258333510c" width="232" height="142" top="193" left="61">
<media id="62" type="image" duration="2">
<content >
<uri>62.jpg</uri>
</content >
</media>
<media id="64" type="image" duration="3">
<content ><uri>64.jpg</uri></content >
<raw/>
</media>
</region>
<region id="58c36a640f47d" width="201" height="122" top="19" left="518">
<media id="63" type="video" duration="60">
<content ><uri>63.avi</uri></content >
</media>
</region>
<region id="58c255e2eb69d" width="251" height="58" top="60" left="102">
<media id="3f7a9f4e73f4c9de164a904dbf9351d4" type="text" duration=" 10">
<content >
<direction>none</direction>
<scrollSpeed>1</scrollSpeed>
</content >
<text color="#ff0000" font-size="28">
A sample
</text>
</media>
</region>
</layout>
Xml layout profile instance descriptions,<layout>For root node, there are three region unit node configurations, first id is 58c258333510c region unit<region>Node has two media information nodes<meida>, type is picture, and picture provides Source reference document is 63.jpg, 63.jpg respectively;The region unit that second id is 58c36a640f47d<region>Node has One media information node<media>, type is video, and the file that video resource is quoted is 63.avi;3rd id be 58c255e2eb69d region unit<region>Node has a media information node<media>, type is text, its word string Content is " A sample ".
Third step:The XML file of Regional Distribution is converted into html file
3.1st, the XML layout configuration file being configured is read to internal memory, and enters step 3.2;
3.2nd, parse<layout>Nodal information, define DisplayLayout classes and be responsible for processing<layout>Nodal information, carry Take width, height, bgcolor, background data message of xml layout pages and be stored in DisplayLayout classes The member variable of object, and enter 3.3;
3.3rd, gone out by the analysis of object of DisplayLayout classes<layout>Child node owns<region>Node, definition DisplayRegion classes are responsible for processing<region>Nodal information, created in DisplayLayout class objects The object array mListRegions of DisplayRegion classes is its member variable,<layout>All child node information are whole It is appended to mListRegions management;The object of DisplayRegion classes is responsible for extracting region unit simultaneously<region>Id, Width, height, top, left data message and enter step to the member variable of the object of DisplayRegiond classes 3.4;
3.4th, it is responsible for parsing its all child node by the object of DisplayRegion classes<media>, definition DisplayMedia classes are responsible for processing<media>Nodal information, created in the object of DisplayRegion classes The object array mListMedias of DisplayMedia classes is its member variable,<region>All child node information all chase after It is added to mListMedias management;The object of DisplayMedia classes is responsible for extraction simultaneously<media>Id, type of nodal information, Duration enters step 3.5 among its member variable;
3.5th, it is responsible for parsing by the object of DisplayMedia classes<content>With<text>Child node information, definition DisplayContent classes are responsible for processing<content>Nodal information, define DisplayText and be responsible for processing<text>Node is believed Breath;The object of the Object Creation DisplayContent classes of DisplayMedia classes is mObjContent and establishment DisplayText object is mObjText, while mObjContent is responsible for extraction<content>Uri file resources or For direction, scrollSpeed information into mObjContent member variable, mObjText is responsible for extraction<text>Node Information font-size, color to DisplayText classes object member variable, and enter step 3.6;
3.6th, DisplayLayout class objects are created the mStrHtmlPage member variables of character string type, it is whole for depositing Individual conversion html page data, the object of DisplayLayout classes believe member variable width, height, bgcolor data Breath value is respectively that HTML is arrived in a, b, c setting<body>The attribute information of node:<body height="a" width="b" bgcolor="c">And this character string is appended to mStrHtmlPage;Judge the object member variable of DisplayLayout classes Background data values are that bg is not space-time, and member variable width, height, background data message value is respectively A, b, bg set and arrived<img>The attribute information of node:<img height="a" width="b" src="bg" id="img- bg"/>And this character string is appended in mStrHtmlPage, and enter step 3.7;
3.7th, object member variable i d, width, height, top, left of DisplayRegion classes data message value Respectively ID, w, h, t, l set and arrive region unit HTML<div>The attribute information of node:<div height="h" width="w" top="t" left="l" class="region" id="ID">And this character string is appended to mStrHtmlPage, and enter Step 3.8;
3.8th, the object of DisplayMedia classes obtains picture path imgPath, video by mObjContent and mObjText Path videoPath, textcolor txColor, word size txSize, word content txContent, character rolling mode When txDirect, character rolling speed txSpeed, type type are image, the object member of DisplayMedia classes is become Amount id, duration data message value are respectively that media information HTML is arrived in ID, ty, dr setting<img>The attribute information of node: <img id="ID" type="image" duration="dr" class="media" src="imgPath"/>, type classes When type is video, the data message value object member variable i d, duration of DisplayMedia classes be respectively ID, ty, Dr sets and arrives media information HTML<video>The attribute information of node:<video id="ID" type="video" duration="dr" class="elm" src="videoPath"/>, and this string content is appended to When mStrHtmlPage.type is text, corresponding data information is set text HTML nodes<div>:<div id="ID" type="text" duration="dr" class="elm" direction="txDirect" scrollSpeed=" txSpeed"><span style="color:txColor; font-size:28px;">txConent</span></span> </div>, and this character string is appended to mStrHtmlPage, and enter step 3.9;
Whether the mListMedias content-datas for the 3.9th, detecting the object of DisplayRegion classes are all converted to HTML characters String is output to mStrHtmlPage, is then to enter step 3.10, otherwise return to step 3.8;
3.10th, to mStrHtmlPage add character string "</div>" identified for region EOB, and enter step 3.11;
Whether the mListRegions content-datas for the 3.11st, detecting the object of DisplayLayout classes are all converted to HTML words Symbol string is output to mStrHtmlPage, is then to enter step 3.12, otherwise return to step 3.7;
3.12nd, to mStrHtmlPage add "</body>" for the end mark of full page, finally in mStrHtmlPage Appearance is stored in entitled layout.html files.
Four steps:Following CSS is added to layout.css files:
.region {
position: absolute;
overflow: hidden;
}
.media{
opacity: 0;
position: absolute;
width: 100%;
height: 100%;
}。
5th step:Layout.js files are added to realize to the element circular traversal that class is media, according to corresponding element The duration playing durations of element calculate, and meet the currently playing period, it is dispaly state to set the HTML element, and other are same Child node element under region unit node is arranged to hidden state, so as to reach to media information HTML element display control.
6th step:Layout.html top of files, which add, quotes layout.css and layout.js files, so far complete Whole is converted into the xml topology files of media information content playable html files.
As can be seen that the present invention defines Regional Distribution's file of XML format, can have under the root node of XML page face more Individual XML region units child node, XML region units node can have multiple media information child nodes, and XML media information nodes have uniquely Image content node or video content node or text node.Regional Distribution includes text, picture, video setup's zone bit Element, layout areas include wide, high size and coordinate position, by the parsing to XML node information, one by one text, and picture, depending on Frequency conversion HTML nodal information generation html files, changing the root node of the html file of realization is<body>Element,<body> Node can have multiple region units<div>Element, region unit<div>Can there are multiple media information HTML element nodes, media Information HTML element can be picture<img>Element or video<video>Element or text<div>Element, so that XML areas The content of domain layout can customize machine, the defined setting of large-size screen monitors terminal display by the way that web browser is cross-platform in commercial TV Good text, picture, video content.
Based on the above method, present invention also offers a kind of storage medium, is stored thereon with a plurality of instruction, and its feature exists In the instruction is adapted to be loaded by processor and performed the method for generating html file by XML file as described above.
Based on the above method, present invention also offers a kind of terminal, wherein, as shown in Fig. 2 including:
Processor 100, it is adapted for carrying out each instruction;And
Storage medium 200, suitable for storing a plurality of instruction, the instruction be adapted to be loaded by processor and performed as described above by The method that XML file generates html file.
Ins and outs and benefit on above-mentioned terminal and storage medium have been elaborated in the above-mentioned methods, this Place repeats no more.
In summary, the Regional Distribution of the invention by pre-defining the XML format for being easy to be converted into html format, according to Regional Distribution's storage text, picture, the display content of video and the attribute, and then it is rapidly converted into HTML when needing display Formatted file, to show text, picture, video content in cross platform system.Solve in the prior art XML format content without Method on the page directly show the problem of.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention Protect scope.

Claims (9)

  1. A kind of 1. method that html file is generated by XML file, it is characterised in that including step:
    Respectively to the page root node of XML file, region unit node, media information node, content node and text message node It is defined, generates the Regional Distribution of XML file;
    Corresponding text, picture or video are configured to XML file according to the Regional Distribution, generate new XML file;
    Dissection process is carried out to new XML file, the text after parsing, picture and video are converted into HTML nodal informations, it is raw Into html file.
  2. 2. the method according to claim 1 that html file is generated by XML file, it is characterised in that the region unit section Point for page root node child node, the media information node be region unit node child node, the content node and text This information node is the child node of media information node.
  3. 3. the method according to claim 2 that html file is generated by XML file, it is characterised in that the page root section The attribute information that point includes is that the page is wide, the page is high and page layout background color and page layout background picture path;The region unit node Comprising attribute information for region unit is wide, region unit facing pages left side deviation post X and the skew of region unit facing pages top margin Position Y and and region block identification ID;The attribute information that the media information node includes be media Display Category, display duration and Media information ID;The content node includes the path node information of picture and video, the attribute letter that text message node includes Cease for word size, the color of text importing and text word content.
  4. 4. the method according to claim 3 that html file is generated by XML file, it is characterised in that described to new XML File carries out dissection process, the text after parsing, picture and video is converted into HTML nodal informations, generation html file is specific Including:
    The page root node information of XML file is parsed, obtains HTML's<body>Element;Under page root node All areas block node parsed, obtain corresponding HTML's<div>Region unit;To all matchmakers under region unit node Body information node is parsed, and is obtained corresponding HTML element, is ultimately produced html file.
  5. 5. the method according to claim 4 that html file is generated by XML file, it is characterised in that described to region unit All media information nodes under node are parsed, and are obtained corresponding HTML element, are specifically included:To media information node Parsed, extract media information type, and judge media information type, when media information type is picture, create HTML 's<img>Element, set according to media information nodal community<img>Attribute of an element simultaneously sets picture path;Work as media information When type is video, create HTML's<video>Element, set according to media information nodal community<video>Attribute of an element And video path is set;When media information type is text, create HTML's<div>Element, while according to media information section Point attribute is set<div>Attribute of an element.
  6. 6. the method according to claim 5 that html file is generated by XML file, it is characterised in that when the media are believed When breath type is text, in addition to:<div>Region unit creates daughter element<span>, set<span>Color, the size of element The text color that is parsed for text node, word size, set<span>The content of element is the text that text node parses This word string content.
  7. 7. the method according to claim 1 that html file is generated by XML file, it is characterised in that also include:In HTML Top of file adds css and js files and quoted.
  8. 8. a kind of storage medium, it is stored thereon with a plurality of instruction, it is characterised in that the instruction is adapted to be loaded and held by processor The method that by XML file generates html file of the row as described in claim 1 ~ 7 is any.
  9. A kind of 9. terminal, it is characterised in that including:
    Processor, it is adapted for carrying out each instruction;And
    Storage medium, suitable for storing a plurality of instruction, the instruction is adapted to be loaded by processor and performed as claim 1 ~ 7 is any The described method that html file is generated by XML file.
CN201710722695.8A 2017-08-22 2017-08-22 By method, storage medium and the terminal of XML file generation html file Pending CN107506431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710722695.8A CN107506431A (en) 2017-08-22 2017-08-22 By method, storage medium and the terminal of XML file generation html file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710722695.8A CN107506431A (en) 2017-08-22 2017-08-22 By method, storage medium and the terminal of XML file generation html file

Publications (1)

Publication Number Publication Date
CN107506431A true CN107506431A (en) 2017-12-22

Family

ID=60692594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710722695.8A Pending CN107506431A (en) 2017-08-22 2017-08-22 By method, storage medium and the terminal of XML file generation html file

Country Status (1)

Country Link
CN (1) CN107506431A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324841A (en) * 2018-12-14 2020-06-23 英业达科技有限公司 Test question file format conversion system and method
CN112307720A (en) * 2020-10-29 2021-02-02 南京航空航天大学 PSD (position sensitive Detector) document-based HTML (Hypertext markup language) design template automatic conversion method and system
CN113010471A (en) * 2019-12-19 2021-06-22 京东安联财产保险有限公司 File conversion method, file conversion device, storage medium and electronic equipment
CN115640095A (en) * 2022-12-12 2023-01-24 北京融和友信科技股份有限公司 Method for generating WEB front-end image by XML and method for generating XML by WEB front-end image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6263332B1 (en) * 1998-08-14 2001-07-17 Vignette Corporation System and method for query processing of structured documents
CN1947114A (en) * 2004-04-08 2007-04-11 佳思腾软件公司 Apparatus for processing documents that use a mark up language
CN102982113A (en) * 2012-11-08 2013-03-20 山东大学 Page loading method for browser based on content grouping of Android system
CN103164201A (en) * 2011-12-15 2013-06-19 航天信息软件技术有限公司 Web page generating method
CN106843861A (en) * 2017-01-05 2017-06-13 深圳市爱立峰科技有限公司 Application interface layout updates method and device
CN107066618A (en) * 2017-05-09 2017-08-18 灯塔财经信息有限公司 Display methods and device after a kind of Webpage conversion

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6263332B1 (en) * 1998-08-14 2001-07-17 Vignette Corporation System and method for query processing of structured documents
CN1947114A (en) * 2004-04-08 2007-04-11 佳思腾软件公司 Apparatus for processing documents that use a mark up language
CN103164201A (en) * 2011-12-15 2013-06-19 航天信息软件技术有限公司 Web page generating method
CN102982113A (en) * 2012-11-08 2013-03-20 山东大学 Page loading method for browser based on content grouping of Android system
CN106843861A (en) * 2017-01-05 2017-06-13 深圳市爱立峰科技有限公司 Application interface layout updates method and device
CN107066618A (en) * 2017-05-09 2017-08-18 灯塔财经信息有限公司 Display methods and device after a kind of Webpage conversion

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324841A (en) * 2018-12-14 2020-06-23 英业达科技有限公司 Test question file format conversion system and method
CN113010471A (en) * 2019-12-19 2021-06-22 京东安联财产保险有限公司 File conversion method, file conversion device, storage medium and electronic equipment
CN112307720A (en) * 2020-10-29 2021-02-02 南京航空航天大学 PSD (position sensitive Detector) document-based HTML (Hypertext markup language) design template automatic conversion method and system
CN115640095A (en) * 2022-12-12 2023-01-24 北京融和友信科技股份有限公司 Method for generating WEB front-end image by XML and method for generating XML by WEB front-end image

Similar Documents

Publication Publication Date Title
CN105373567B (en) Page generation method and client
Adami Introducing multimodality
Siricharoen et al. How infographic should be evaluated
CN107506431A (en) By method, storage medium and the terminal of XML file generation html file
US20030174165A1 (en) System and method for rendering a directed graph
WO2011052526A1 (en) Characteristic content determination program, characteristic content determination device, characteristic content determination method, recording medium, content generation device, and related content insertion device
CN102831190B (en) A kind of method that CML files are browsed in low side devices
CN107924387A (en) system and method for generating electronic page
CN109165014B (en) Method, device and equipment for editing control and computer storage medium
Zhou et al. Application and innovation of digital media technology in visual design
JP2020086422A (en) Method and system for editing font using svg format and computer-readable recording medium
Zhang et al. From writing to drawing: Examining visual composition in danmu-mediated textual communication
Watt SVG unleashed
Siricharoen et al. Question matrix method according to divided dimensions of infographics evaluation
Spritzer et al. Towards a smooth design process for static communicative node‐link diagrams
Salim et al. Comparative study of low-cost tools to create effective educational infographics content
Zhong et al. Research trends in multimodal metaphor: a bibliometric analysis
Tejakusuma et al. Elevating Thematic Branding through Social Media Content: A Visual Concept of Kayutangan Heritage's Instagram Feed
JP2011113460A (en) Information providing system
CN109086047A (en) EPG page visual data manager and device based on EUL
CN107609050A (en) New page system and its works generation method based on HTML5
KR102263458B1 (en) Method and Apparatus for Generating E-Book File
WO2019019534A1 (en) Formula display method and apparatus, terminal, and computer-readable storage medium
JP2006092462A (en) Automatic conversion system for electronic book content and construction of electronic book shared database
Jensen et al. Introduction: Emerging patterns of news production and consumption across media

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200714

Address after: Room 821, No. 333, jiufo Jianshe Road, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province 510000

Applicant after: Skyworth Group Intelligent Technology Co., Ltd

Address before: The 510530 Guangdong economic and Technological Development Zone of Guangzhou Science City Kaida Road No. 99

Applicant before: GUANGZHOU SKYWORTH FLAT DISPLAY TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20171222

RJ01 Rejection of invention patent application after publication