CN104715054A - Method for converting Silverlight content into HTML webpage content - Google Patents
Method for converting Silverlight content into HTML webpage content Download PDFInfo
- Publication number
- CN104715054A CN104715054A CN201510144451.7A CN201510144451A CN104715054A CN 104715054 A CN104715054 A CN 104715054A CN 201510144451 A CN201510144451 A CN 201510144451A CN 104715054 A CN104715054 A CN 104715054A
- Authority
- CN
- China
- Prior art keywords
- silverlight
- content
- xaml
- text
- html
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9562—Bookmark management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
Abstract
The invention provides a method for converting Silverlight content into HTML webpage content. The method has the beneficial effects that attribute information and styles of labels in an original XAML text file generated by a Silverlight file are expanded and encapsulated again, are converted into a character string, and are analyzed to form content which can be browsed by an HTML webpage, so that a user can directly browse existing Silverlight creation content by virtue of a browser without mounting Silverlight plug-in; the Silverlight content can be directly browsed on equipment such as a PC, a mobile phone and a tablet device; and the Silverlight content can be directly browsed on the systems such as iOS and Android, so that the user can reach the best browse experience.
Description
Technical field
The present invention relates to a kind of data structure conversion method, particularly a kind of method Silverlight Content Transformation being become html web page content.
Background technology
Microsoft Silverlight is a browser-cross, cross-platform plug-in unit, for network brings the media experience based on .NET Framework of future generation and abundant interactive application.Silverlight provides programming model flexibly, and can be integrated into easily in existing web application.Silverlight can provide the transmission of quick, the low cost of high-quality video information to the major browsers operated on Mac or Windows.
For development and Design personnel, Silverlight is that a kind of Web of the multiple technologies merging Microsoft presents technology.It provide a set of Development Framework, and by using the image layer technology based on vector, supporting the seamless integration of any sized image, achieving seamless link to based on asp .net, AJAX at interior Web development environment.Silverlight enables development and Design personnel better cooperate, and effectively creates abundant in content, web application---the Silverlight application program that interface is gorgeous that can run in multiple browser on Windows and Macintosh.In brief, Silverlight is a browser-cross, cross-platform plug-in unit, for network brings of future generation based on .NET media experience, and abundant interactive application.
Just for these reasons, a lot of contents on current internet are all realized by Silverlight, but browsing of Silverlight content needs the plug-in unit installing special Silverlight to realize, and this can affect the viewing experience of certain customers to a certain extent.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide one Silverlight Content Transformation can be become html web page content, making the method that user just can browse the content adopting Silverlight to create without the need to installing Silverlight plug-in unit.
For achieving the above object and other relevant objects, the invention provides a kind of method Silverlight Content Transformation being become html web page content, it comprises the steps:
1) search the label in the former XAML text of Silverlight file generated, the implication corresponding to label, expand attribute information and the pattern of label in former XAML text, and Reseal is carried out to label in former XAML text;
2) label in the XAML text after Reseal is converted into the character string that can be used as html data source;
3) resolve character string, then the data of correspondence are played up out by HTML mark.
Preferably, in step 2) in, the character string of conversion is JSON character string, is to resolve JSON character string by JS in step 3).
Preferably, in the resolving of step 3), arranging the table of comparisons of the XAML text label after Reseal and html tag, is html text by the XAML text file analysis after Reseal.
Preferably, in resolving, the label in XAML text adopts html format, and attribute information is realized by JS, and pattern adopts CSS form.
As mentioned above, of the present inventionly the method for html web page content is become to have following beneficial effect Silverlight Content Transformation: this conversion method is by label extended attribute information in the former XAML text of Silverlight file generated and pattern and carry out Reseal, again by change into character string and resolve after, become the content that html web page can be adopted to browse, so just without the need to installing Silverlight plug-in unit, the viewing experience that user reaches best can be made.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the embodiment of the present invention.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
As shown in Figure 1, the invention provides a kind of method Silverlight Content Transformation being become html web page content, it comprises the steps:
First search the label in the former XAML text of Silverlight file generated, the label in former XAML text mainly comprises text, shape, picture, video, audio frequency, speech sound eeplaining etc.The attribute itself provided due to these former XAML files and pattern fairly simple, abundant pattern effect cannot be provided, so we need encapsulate these former XAML texts and expand, thus business datum and the storage enriching pattern can be provided in parts.According to the implication corresponding to each label, expand attribute information and the pattern of label in former XAML text, and Reseal is carried out to label in former XAML text; Attribute information and the pattern of expansion mainly comprise text parts, rectangular member, figure chip part etc.Expansion content is used for combining primary XAML and revising, and provides more abundant parts pattern, the content of recording user input, so that html web page is shown.
Then label in the XAML text after Reseal is converted into the character string that can be used as html data source, generally be converted into JSON character string, consider the size of JSON file, this JSON character string only records the type of combination XAML parts and is applicable to combine the completed pattern on XAML parts and user input content.Then resolve JSON character string by JS, the table of comparisons of the XAML text label after Reseal and html tag should be set in resolving, the XAML format text after Reseal is resolved to html format text.In resolving, the label in XAML format text adopts html format, and attribute information utilizes JS to realize, and pattern adopts CSS form.Finally the data of correspondence are played up out by HTML, CSS, JS, make content page, picture format and HTML content adaptation, such Silverlight content is just convertible into html web page content and shows.
Below in conjunction with a specific embodiment, technical solution of the present invention is further described.
First search the label in the former XAML text of Silverlight file generated, expand attribute information and the pattern of label in former XAML text, and Reseal is carried out to label in former XAML text.Definition Oceansoft.Course.Component.RichTextEditor.OsRichTextBox is the type of combiner, and System.Windows.Media.SolidColorBrush is the background color being applicable to combiner.Then in resolving, when being resolved to the such content of Oceansoft.Course.Component.RichTextEditor.OsRichTextBox, convert the P label in html to, the attribute data that rear reading stores inside this, for example: be shown as horizontal rolling captions, vertical scrolling captions, viewing area be shown as oval etc., then utilize JS grammer, realize these effects.When System.Windows.Media.SolidColorBrush then being detected, the pattern data of the inside is filled in P label, when Html attribute being detected, displaying contents is filled into the inside of P label.
HTML content adaptation after conversion is content in the size fine setting page according to current device, specifically comprises: content page size, picture format;
N content page size adjustment logic;
The size of u device navigator effective dimensions >=content page, shows according to content page size former state;
The size of u device navigator effective dimensions < content page, according to the size of device navigator effective dimensions scaled down content page;
U, according to after 2 kinds of effect application above, if content is high, wide with within the scope of the adjacent 10px in device navigator four limit, then automatically fills up device navigator, does not interspace;
Content in the u page is according to scaling auto scaling above;
N picture format;
U, according to content of pages scaling above, shows after image content equal proportion convergent-divergent, can reduce picture size like this, promotes picture display speed;
That u current picture compression ratio is the highest is webp, but not every equipment is all supported, so according to the support situation of equipment to webp format picture, determine whether the webp form obtaining former picture, further reduction picture size, promotes picture display speed.
Following table is that primary XAML follows html tag table of comparisons fragment (can use when resolving JSON character string):
XAML label | Html tag |
Paragraph | p |
LineBreak | br |
BlockUIContainer/Section | div |
Table | table |
TableColumn | col |
TableRowGroup | tbody |
TableRow | tr |
TableCell | td |
Image | img |
Blod | b |
Italic | i |
Span/Run/InlineUIContainer | span |
List(MarkerStyle:None/Disc/Circle/Square/Box) | ul/ol |
ListItem | li |
Primary XAML forms some following widening parts after carrying out encapsulation expansion: following table is that primary XAML follows html tag table of comparisons fragment (can use when resolving JSON character string):
Combination XAML | Part description |
Oceansoft.Course.Component.RichTextEditor.OsRichTextBox | Text parts |
Oceansoft.Course.Component.Shapes.* | Shaped member, exports SVG data |
Oceansoft.Course.OsControls.OSImage | Picture |
Oceansoft.Course.Component.MediaPlayerPlus.MediaPlayerPlusView | Multimedia components (video, audio frequency) |
Oceansoft.Course.Component.FrameAnimations.SimpleFrameAnimation | Simple and easy frame animation |
Oceansoft.Course.Component.FrameAnimations.CustomFrameAnimation | Self-defined frame animation |
Oceansoft.Course.Component.Narrator | Speech sound eeplaining |
Of the present inventionly the method for html web page content is become to have following beneficial effect Silverlight Content Transformation: this conversion method is by label extended attribute information in the former XAML text of Silverlight file generated and pattern and carry out Reseal, again by change into character string and resolve after, become the content that html web page can be adopted to browse, such user is just without the need to installing Silverlight plug-in unit, just can directly use browser just can browse existing Silverlight author content, Silverlight content can at PC, mobile phone, dull and stereotyped grade on equipment is directly browsed, Silverlight content can at iOS, the systems such as Android are directly browsed, the viewing experience that user reaches best can be made.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.
Claims (4)
1. Silverlight Content Transformation is become a method for html web page content, it is characterized in that, it comprises the steps:
Search the label in the former XAML text of Silverlight file generated, the implication corresponding to label, expand attribute information and the pattern of label in former XAML text, and Reseal is carried out to label in former XAML text;
Label in XAML text after Reseal is converted into the character string that can be used as html data source;
Resolve character string, then the data of correspondence are played up out by HTML mark.
2. method Silverlight Content Transformation being become html web page content according to claim 1, is characterized in that: in step 2) in, the character string of conversion is JSON character string, is to resolve JSON character string by JS in step 3).
3. method Silverlight Content Transformation being become html web page content according to claim 2, it is characterized in that: in the resolving of step 3), arranging the table of comparisons of the XAML text label after Reseal and html tag, is html text by the XAML text file analysis after Reseal.
4. method Silverlight Content Transformation being become html web page content according to claim 3, is characterized in that: in resolving, and the label in XAML text adopts html format, and attribute information is realized by JS, and pattern adopts CSS form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510144451.7A CN104715054B (en) | 2015-03-30 | 2015-03-30 | Method by Silverlight Content Transformations into html web page content |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510144451.7A CN104715054B (en) | 2015-03-30 | 2015-03-30 | Method by Silverlight Content Transformations into html web page content |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104715054A true CN104715054A (en) | 2015-06-17 |
CN104715054B CN104715054B (en) | 2018-04-17 |
Family
ID=53414380
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510144451.7A Active CN104715054B (en) | 2015-03-30 | 2015-03-30 | Method by Silverlight Content Transformations into html web page content |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104715054B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105739969A (en) * | 2016-01-21 | 2016-07-06 | 南京南瑞集团公司 | Input tags-based application method of custom tags |
CN107346306A (en) * | 2016-05-04 | 2017-11-14 | 北京京东尚科信息技术有限公司 | Webpage describes method and apparatus |
CN108829648A (en) * | 2018-05-30 | 2018-11-16 | 北京小度信息科技有限公司 | The conversion method and device of Web markup language |
CN111507074A (en) * | 2020-05-19 | 2020-08-07 | 深圳市商汤科技有限公司 | Data processing method and device, processor, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090210859A1 (en) * | 2008-02-18 | 2009-08-20 | Ricoh Company, Ltd. | Infromation processing apparatus, information processing method, and function expansion program |
US20100077320A1 (en) * | 2008-09-19 | 2010-03-25 | United States Government As Represented By The Secretary Of The Navy | SGML/XML to HTML conversion system and method for frame-based viewer |
US20100146381A1 (en) * | 2008-12-01 | 2010-06-10 | Esobi Inc. | Method of establishing a plain text document from a html document |
CN102662921A (en) * | 2012-03-29 | 2012-09-12 | 华为技术有限公司 | Document processing method, device and editor |
CN102831190A (en) * | 2012-08-03 | 2012-12-19 | 北京中广睛彩导航科技有限公司 | Method for browsing current-mode logic (CML) files on low-end equipment |
-
2015
- 2015-03-30 CN CN201510144451.7A patent/CN104715054B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090210859A1 (en) * | 2008-02-18 | 2009-08-20 | Ricoh Company, Ltd. | Infromation processing apparatus, information processing method, and function expansion program |
US20100077320A1 (en) * | 2008-09-19 | 2010-03-25 | United States Government As Represented By The Secretary Of The Navy | SGML/XML to HTML conversion system and method for frame-based viewer |
US20100146381A1 (en) * | 2008-12-01 | 2010-06-10 | Esobi Inc. | Method of establishing a plain text document from a html document |
CN102662921A (en) * | 2012-03-29 | 2012-09-12 | 华为技术有限公司 | Document processing method, device and editor |
CN102831190A (en) * | 2012-08-03 | 2012-12-19 | 北京中广睛彩导航科技有限公司 | Method for browsing current-mode logic (CML) files on low-end equipment |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105739969A (en) * | 2016-01-21 | 2016-07-06 | 南京南瑞集团公司 | Input tags-based application method of custom tags |
CN105739969B (en) * | 2016-01-21 | 2018-11-02 | 南京南瑞集团公司 | Application method based on the self-defined tag labels of input labels |
CN107346306A (en) * | 2016-05-04 | 2017-11-14 | 北京京东尚科信息技术有限公司 | Webpage describes method and apparatus |
CN108829648A (en) * | 2018-05-30 | 2018-11-16 | 北京小度信息科技有限公司 | The conversion method and device of Web markup language |
CN111507074A (en) * | 2020-05-19 | 2020-08-07 | 深圳市商汤科技有限公司 | Data processing method and device, processor, electronic equipment and storage medium |
CN111507074B (en) * | 2020-05-19 | 2022-08-26 | 深圳市商汤科技有限公司 | Data processing method and device, processor, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104715054B (en) | 2018-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103176986B (en) | Method for converting flash animation data into hypertext markup language (HTML) 5 data | |
CN102663126B (en) | Method and device for displaying webpage in mobile terminal | |
CN102012906B (en) | Three-dimensional scene management platform based on SaaS architecture and editing and browsing method | |
US20130326333A1 (en) | Mobile Content Management System | |
CN101699426A (en) | Document format conversion system and method | |
CN107402985B (en) | Video special effect output control method and device and computer readable storage medium | |
CN102890632A (en) | Screen adaptation method, system and terminal device | |
CN104380280A (en) | System and method for dynamically converting webpage, and computer-readable recording medium | |
CN108268262A (en) | Realize the method, apparatus and system that HTML is converted to wechat small routine | |
CN105808217A (en) | Flow chart drawing method and system based on XML | |
CN103353878A (en) | Method for displaying files of different file formats in webpage | |
CN104715054A (en) | Method for converting Silverlight content into HTML webpage content | |
CN107992589B (en) | SVG map data loading method, device and system | |
CN105007539A (en) | HTML template-based method, equipment and system for releasing graphics and text information via television | |
CN104217037A (en) | Method and device for displaying web page in mobile terminal | |
CN105094930A (en) | Image positioning system and method | |
CN109683978B (en) | Stream type layout interface rendering method and device and electronic equipment | |
CN106776800B (en) | Page generation method, device and system for AngularJS framework | |
CN103197908A (en) | Information display platform based PDF (portable document format) file display method and information display platform based PDF file display system | |
CN102420855A (en) | Method and system for displaying and playing by light-emitting diode (LED) terminal as well as server | |
CN105956133B (en) | Method and device for displaying file on intelligent terminal | |
CN103049430A (en) | Page display method based on IDF (interactive document format) files | |
CN101710971A (en) | Method and device for generating page | |
CN103488468A (en) | Compiling method and system for portal web site pages | |
JP5005782B2 (en) | Image generation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 215000 the 20 floor of No. 209, No. 2, bamboo garden road, Suzhou high tech Zone, Suzhou, Jiangsu Applicant after: Jiangsu Yun School Network Technology Co., Ltd. Address before: 215000 the 20 floor of No. 209, No. 2, bamboo garden road, Suzhou, Jiangsu Applicant before: Jiang Suhui knows network technology company limited |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |